Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AzurePipelines/Publish.UPM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ pool:

steps:
- task: Npm@1
# Only update the version on master branch
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
inputs:
command: 'custom'
customCommand: --no-git-tag-version version prerelease --preid=$(Build.BuildNumber)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Plugins/
.obj/
Plugins.meta
!*.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ExternalMonoBehaviour : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Debug.Log(typeof(ExternalMonoBehaviour).BaseType.FullName);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<Project ToolsVersion="15.0">
<!--anborod NOTE:: This relies on the common props file generated by MSBuildForUnity to set the rest up-->
<Import Project="$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))')" />

<PropertyGroup Condition="'$(UnityCurrentTargetFramework)' == ''">
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(UnityCurrentTargetFramework)' != ''">
<TargetFramework>$(UnityCurrentTargetFramework)</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(UnityCurrentPlatform)'!=''">
<UnityPlatform>$(UnityCurrentPlatform)</UnityPlatform>
</PropertyGroup>

<PropertyGroup>
<!--anborod NOTE:: Currently this is a limitation, hence the file duplication..-->
<UnityConfiguration>Player</UnityConfiguration>
<ProjectGuid>{E8060EE6-F0CB-459B-A4B2-634E87DFDD9C}</ProjectGuid>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<LangVersion>7.3</LangVersion>
<IsEditorOnlyTarget>False</IsEditorOnlyTarget>
<EnableDefaultItems>false</EnableDefaultItems>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

<AssemblyName>CustomUnityBuild</AssemblyName>
<RootNamespace>CustomUnityBuild</RootNamespace>
</PropertyGroup>

<!-- anborod NOTE:: These are needed for meta generation -->
<!--anborod NOTE:: NOT WORKING <PropertyGroup>
<UnityPlayer Condition="'$(UnityPlatform)' == 'WindowsStandalone32' OR '$(UnityPlatform)' == 'WindowsStandalone64'">Standalone</UnityPlayer>
<UnityPlayer Condition="'$(UnityPlatform)' == 'Android'">Android</UnityPlayer>
<UnityPlayer Condition="'$(UnityPlatform)' == 'iOS'">iOS</UnityPlayer>
<UnityPlayer Condition="'$(UnityPlatform)' == 'WSA'">UAP</UnityPlayer>
</PropertyGroup>-->

<PropertyGroup>
<!--anborod NOTE:: .obj is invisible to Unity, but Plugins isn't-->
<BaseIntermediateOutputPath>.obj</BaseIntermediateOutputPath>
<OutputPath>Plugins/Editor</OutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MSBuildForUnity" Version="[0.8.0-*, 0.8.0]">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<!--IMPORT SDK.props manually to be able to set the BaseIntermediateOutputPath above path-->
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<!--
This overrides the default, and excludes the "{TargetFrameworkDirectory}" from the search path which gets added by the import above.
The purpose is to prevent MSBuild from using it to try and resolve assemblies from that location, as we use the Unity provided framework DLLs.
-->
<AssemblySearchPaths>{CandidateAssemblyFiles};{HintPathFromItem};{RawFileName};</AssemblySearchPaths>
</PropertyGroup>

<!--anborod NOTE:: This brings in all the #DEFINES and appropriate references for the platform and unity configuration specified-->
<Import Project="$(MSBuildForUnityGeneratedOutputDirectory)\$(UnityPlatform).$(UnityConfiguration).props" />

<!-- This is a "special" platform that will override references -->
<Import Project="$(MSBuildForUnityGeneratedOutputDirectory)\Editor.InEditor.props" Condition="'$(IsEditorOnlyTarget)' == 'true'" />

<PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes)obj;bin;*.asmdef;*.asmdef.meta;*.csmap;</DefaultItemExcludes>
<!-- This change prevents from System.Core dll to be removed and readded without the HintPath as is default behaviour for some MSBuild environments for System.Core.dll specifically.-->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>

<ItemGroup>
<!--anborod NOTE:: This references all source in .src (invisible to Unity) folder.-->
<!--anborod NOTE:: Add your NuGet packages here.-->
<Compile Include=".src\**\*.cs" />
</ItemGroup>

<!--IMPORT SDK.targets-->
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<!--We control whether we build the project this way, depending on the platform/configuration-->
<Target Name="OriginalBuild" DependsOnTargets="$(BuildDependsOn)">
</Target>

<Target Name="SetPlatformProperty">
<CreateProperty Value="AnyCPU">
<Output TaskParameter="Value" PropertyName="Platform" />
</CreateProperty>
</Target>

<Target Name="Build" Returns="@(TargetPathWithTargetPlatformMoniker)">
<CallTarget Targets="SetPlatformProperty" />
<!--SUPPORTED_PLATFORM_BUILD_CONDITION_TEMPLATE_START-->
<CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|Android'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|iOS'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|WindowsStandalone32'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|WindowsStandalone64'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|WSA'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='Player|WSA'" />
<!--SUPPORTED_PLATFORM_BUILD_CONDITION_TEMPLATE_END-->
</Target>
</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<Project ToolsVersion="15.0">
<!--anborod NOTE:: This relies on the common props file generated by MSBuildForUnity to set the rest up-->
<Import Project="$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))')" />

<PropertyGroup Condition="'$(UnityCurrentTargetFramework)' == ''">
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(UnityCurrentTargetFramework)' != ''">
<TargetFramework>$(UnityCurrentTargetFramework)</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(UnityCurrentPlatform)'!=''">
<UnityPlatform>$(UnityCurrentPlatform)</UnityPlatform>
</PropertyGroup>

<PropertyGroup>
<!--anborod NOTE:: Currently this is a limitation, hence the file duplication..-->
<UnityConfiguration>InEditor</UnityConfiguration>
<UnityPlayer>Editor</UnityPlayer>
<ProjectGuid>bb41a40a-fd6b-47da-0865-83ab52977bdc</ProjectGuid>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<LangVersion>7.3</LangVersion>
<IsEditorOnlyTarget>False</IsEditorOnlyTarget>
<EnableDefaultItems>false</EnableDefaultItems>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>

<PropertyGroup>
<!--anborod NOTE:: .obj is invisible to Unity, but Plugins isn't-->
<BaseIntermediateOutputPath>.obj</BaseIntermediateOutputPath>
<OutputPath>Plugins/Player</OutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MSBuildForUnity" Version="[0.8.0-*, 0.8.0]">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<!--IMPORT SDK.props manually to be able to set the BaseIntermediateOutputPath above path-->
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<!--
This overrides the default, and excludes the "{TargetFrameworkDirectory}" from the search path which gets added by the import above.
The purpose is to prevent MSBuild from using it to try and resolve assemblies from that location, as we use the Unity provided framework DLLs.
-->
<AssemblySearchPaths>{CandidateAssemblyFiles};{HintPathFromItem};{RawFileName};</AssemblySearchPaths>
</PropertyGroup>

<!--anborod NOTE:: This brings in all the #DEFINES and appropriate references for the platform and unity configuration specified-->
<Import Project="$(MSBuildForUnityGeneratedOutputDirectory)\$(UnityPlatform).$(UnityConfiguration).props" />

<!-- This is a "special" platform that will override references -->
<Import Project="$(MSBuildForUnityGeneratedOutputDirectory)\Editor.InEditor.props" Condition="'$(IsEditorOnlyTarget)' == 'true'" />

<PropertyGroup>
<DefaultItemExcludes>$(DefaultItemExcludes)obj;bin;*.asmdef;*.asmdef.meta;*.csmap;</DefaultItemExcludes>
<!-- This change prevents from System.Core dll to be removed and readded without the HintPath as is default behaviour for some MSBuild environments for System.Core.dll specifically.-->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>

<ItemGroup>
<!--anborod NOTE:: This references all source in .src (invisible to Unity) folder.-->
<!--anborod NOTE:: Add your NuGet packages here.-->
<Compile Include=".src\**\*.cs" />
</ItemGroup>

<!--IMPORT SDK.targets-->
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<!--We control whether we build the project this way, depending on the platform/configuration-->
<Target Name="OriginalBuild" DependsOnTargets="$(BuildDependsOn)">
</Target>

<Target Name="SetPlatformProperty">
<CreateProperty Value="AnyCPU">
<Output TaskParameter="Value" PropertyName="Platform" />
</CreateProperty>
</Target>

<Target Name="Build" Returns="@(TargetPathWithTargetPlatformMoniker)">
<CallTarget Targets="SetPlatformProperty" />
<!--SUPPORTED_PLATFORM_BUILD_CONDITION_TEMPLATE_START-->
<CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|Android'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|iOS'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|WindowsStandalone32'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|WindowsStandalone64'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='InEditor|WSA'" /><CallTarget Targets="OriginalBuild" Condition="'$(UnityConfiguration)|$(UnityPlatform)'=='Player|WSA'" />
<!--SUPPORTED_PLATFORM_BUILD_CONDITION_TEMPLATE_END-->
</Target>
</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="MSBuildForUnity" value="https://pkgs.dev.azure.com/UnityDeveloperTools/MSBuildForUnity/_packaging/UnityDeveloperTools/nuget/v3/index.json" />
</packageSources>
</configuration>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading