-
Notifications
You must be signed in to change notification settings - Fork 32
A simple Cross-Unity Project Dependency Relationship #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9b82eb5
8520622
613cbb8
005a9b7
6fe780e
b52807a
9931587
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # This .gitignore file should be placed at the root of your Unity project directory | ||
| # | ||
| # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore | ||
| # | ||
| /[Ll]ibrary/ | ||
| /[Tt]emp/ | ||
| /[Oo]bj/ | ||
| /[Bb]uild/ | ||
| /[Bb]uilds/ | ||
| /[Ll]ogs/ | ||
| /[Mm]emoryCaptures/ | ||
|
|
||
| # Never ignore Asset meta data | ||
| !/[Aa]ssets/**/*.meta | ||
|
|
||
| # Uncomment this line if you wish to ignore the asset store tools plugin | ||
| # /[Aa]ssets/AssetStoreTools* | ||
|
|
||
| # Autogenerated Jetbrains Rider plugin | ||
| [Aa]ssets/Plugins/Editor/JetBrains* | ||
|
|
||
| # Visual Studio cache directory | ||
| .vs/ | ||
|
|
||
| # Gradle cache directory | ||
| .gradle/ | ||
|
|
||
| # Autogenerated VS/MD/Consulo solution and project files | ||
| ExportedObj/ | ||
| .consulo/ | ||
| *.csproj | ||
| *.unityproj | ||
| *.sln | ||
| *.suo | ||
| *.tmp | ||
| *.user | ||
| *.userprefs | ||
| *.pidb | ||
| *.booproj | ||
| *.svd | ||
| *.pdb | ||
| *.mdb | ||
| *.opendb | ||
| *.VC.db | ||
|
|
||
| # Unity3D generated meta files | ||
| *.pidb.meta | ||
| *.pdb.meta | ||
| *.mdb.meta | ||
|
|
||
| # Unity3D generated file on crash reports | ||
| sysinfo.txt | ||
|
|
||
| # Builds | ||
| *.apk | ||
| *.unitypackage | ||
|
|
||
| # Crashlytics generated file | ||
| crashlytics-build.properties | ||
|
|
||
| # Custom MSBuildForUnity Project Related ignore entries | ||
| /MSBuild/* | ||
| !/MSBuild/Publish/ | ||
| !/MSBuild/settings.json | ||
| /MSBuild/Publish/**/*.dll | ||
| /MSBuild/Publish/**/*.pdb | ||
| /MSBuildForUnity.Common.props | ||
| !/Assets/**/*.msb4u.* | ||
| !/Packages/**/*.msb4u.* | ||
| /Assets/Dependencies |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <Project ToolsVersion="15.0"> | ||
| <!--GENERATED FILE--> | ||
| <!-- | ||
| This file can be modified and checked in as long as the following rules are met: | ||
| - Both the imports are present: | ||
| - - <Import Project="$(MSBuildProjectName).g.props" /> | ||
| - - <Import Project="$(MSBuildProjectName).g.targets" /> | ||
| - Nothing above the props import or below the targets import is modified | ||
| - No C# source files are added for compilation | ||
|
|
||
| You can modify this file as follows: | ||
| - Add NuGet package references: | ||
| <ItemGroup> | ||
| <PackageReference Include="Newtonsoft.Json" Version="11.0.1" /> | ||
| </ItemGroup> | ||
| - Add external C# project references: | ||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\..\ExternalLib\ExternalLib.csproj" /> | ||
| </ItemGroup> | ||
| --> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))')" /> | ||
| <PropertyGroup> | ||
| <!--anborod: This is a weird thing, it is a required property (even if commented)--> | ||
| <!--<TargetFrameworks>netstandard2.0;uap10.0;net46</TargetFrameworks> --> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- SDK.props is imported inside this props file --> | ||
| <Import Project="$(MSBuildForUnityGeneratedProjectDirectory)\$(MSBuildProjectName).g.props" /> | ||
|
|
||
| <ItemGroup> | ||
| <!-- Add your references here --> | ||
| <!-- This reference to a separate Unity project should also be placed in Dependencies.msb4u.csproj. --> | ||
| <ProjectReference Include="..\..\IntegratedDependencies.Unity\Assets\GeneralComponent\GeneralComponent.msb4u.csproj"/> | ||
| </ItemGroup> | ||
|
|
||
| <!-- SDK.targets is imported inside this props file --> | ||
| <Import Project="$(MSBuildForUnityGeneratedProjectDirectory)\$(MSBuildProjectName).g.targets" /> | ||
| </Project> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
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,14 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
|
||
| using UnityEngine; | ||
|
|
||
| public class CrossUnityTestScript : MonoBehaviour | ||
| { | ||
| private GeneralComponentType generalComponentType = new GeneralComponentType(); | ||
|
|
||
| private void Start() | ||
| { | ||
| Debug.Log(generalComponentType.GetThisDataToo()); | ||
| } | ||
| } |
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.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <Project ToolsVersion="15.0"> | ||
| <!--GENERATED FILE--> | ||
| <!-- | ||
| This file can be modified and checked in. | ||
|
|
||
| It is different from the other generated C# Projects in that it will be the one gathering all dependencies and placing them into the Unity asset folder. | ||
|
|
||
| You can add project level dependencies to this file, by placing them below: | ||
| - <Import Project="$(MSBuildForUnityGeneratedProjectDirectory)\$(MSBuildProjectName).g.props" /> | ||
| and before: | ||
| - <Import Project="$(MSBuildForUnityGeneratedProjectDirectory)\$(MSBuildProjectName).g.targets" /> | ||
|
|
||
| Do not add any source or compliation items. | ||
|
|
||
| Examples of how you can modify this file: | ||
| - Add NuGet package references: | ||
| <ItemGroup> | ||
| <PackageReference Include="Newtonsoft.Json" Version="11.0.1" /> | ||
| </ItemGroup> | ||
| - Add external C# project references: | ||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\..\ExternalLib\ExternalLib.csproj" /> | ||
| </ItemGroup> | ||
| --> | ||
|
|
||
| <Import Project="$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(MSBuildForUnity.Common.props))')" /> | ||
|
|
||
| <PropertyGroup> | ||
| <!--anborod: This is a weird thing, it is a required property (even if commented)--> | ||
| <!--<TargetFrameworks>netstandard2.0;uap10.0;net46</TargetFrameworks> --> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- SDK.props is imported inside this props file --> | ||
| <Import Project="$(MSBuildForUnityGeneratedProjectDirectory)\$(MSBuildProjectName).g.props" /> | ||
|
|
||
| <ItemGroup> | ||
| <!-- Add your references here --> | ||
| <ProjectReference Include="..\..\IntegratedDependencies.Unity\Assets\GeneralComponent\GeneralComponent.msb4u.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- SDK.targets is imported inside this props file --> | ||
| <Import Project="$(MSBuildForUnityGeneratedProjectDirectory)\$(MSBuildProjectName).g.targets" /> | ||
| </Project> | ||
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think we benefit from having this much content in all generated files? It kind of seems like if I was only shown a reference example this file would be less intimidating for someone new to csproj definitions. #WontFix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reducing the amount of content in this file will make it easier to read in things like notepad
In reply to: 367709527 [](ancestors = 367709527)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will keep it for now, but will consider it in the future.
In reply to: 367709703 [](ancestors = 367709703,367709527)