Skip to content
Permalink
Browse files

Merge branch 'master' into bulletsharp_nuget

  • Loading branch information
Eideren committed May 23, 2019
2 parents 83c971c + 2f396b1 commit 3be3ca71a6fd925a7bfeeeb3ec86cd63bcd5f92a
Showing with 524 additions and 590 deletions.
  1. +3 −3 README.md
  2. +2 −2 build/.nuget/NuGet.exe
  3. +2 −2 deps/AssemblyProcessor/Mono.Cecil.Mdb.dll
  4. +2 −2 deps/AssemblyProcessor/Mono.Cecil.Pdb.dll
  5. +1 −1 deps/AssemblyProcessor/Mono.Cecil.Rocks.dll
  6. +2 −2 deps/AssemblyProcessor/Mono.Cecil.dll
  7. +2 −2 deps/AssemblyProcessor/Xenko.Core.AssemblyProcessor.Packed.exe
  8. +2 −2 deps/AssemblyProcessor/Xenko.Core.AssemblyProcessor.Packed.pdb
  9. +1 −1 deps/AssemblyProcessor/Xenko.Core.AssemblyProcessor.exe
  10. +1 −1 deps/AssemblyProcessor/Xenko.Core.AssemblyProcessor.pdb
  11. +0 −3 deps/Mono.Cecil/Mono.Cecil.Rocks.dll
  12. +0 −3 deps/Mono.Cecil/build.bat
  13. +0 −2 deps/Mono.Cecil/checkout.bat
  14. +1 −1 deps/OpenTK/iOS/link.bat
  15. +1 −1 deps/Xenko.GitVersioning/Xenko.GitVersioning.csproj
  16. 0 deps/{Mono.Cecil → monolinker}/.gitignore
  17. 0 deps/{Mono.Cecil → monolinker}/License.txt
  18. 0 deps/{Mono.Cecil → monolinker}/Mono.Cecil.Mdb.dll
  19. 0 deps/{Mono.Cecil → monolinker}/Mono.Cecil.Pdb.dll
  20. 0 deps/{Mono.Cecil → monolinker}/Mono.Cecil.dll
  21. 0 deps/{Mono.Cecil → monolinker}/monolinker.exe
  22. +1 −0 samples/Graphics/SpriteStudioDemo/SpriteStudioDemo.Game/SpriteStudioDemo.Game.csproj
  23. +0 −6 samples/Templates/Packs/MaterialPackage/MaterialPackage.props
  24. +0 −6 samples/Templates/Packs/PrototypingBlocks/PrototypingBlocks.props
  25. +0 −6 samples/Templates/Packs/SamplesAssetPackage/SamplesAssetPackage.props
  26. +0 −6 samples/Templates/Packs/VFXPackage/VFXPackage.props
  27. +0 −6 samples/Templates/Packs/mannequinModel/mannequinModel.props
  28. +2 −2 samples/Tests/Xenko.Samples.Tests.csproj
  29. +3 −2 sources/assets/Xenko.Core.Assets.CompilerApp/Xenko.Core.Assets.CompilerApp.csproj
  30. +2 −2 sources/assets/Xenko.Core.Assets.CompilerClient/Xenko.Core.Assets.CompilerClient.csproj
  31. +2 −2 sources/assets/Xenko.Core.Assets.Quantum.Tests/Xenko.Core.Assets.Quantum.Tests.csproj
  32. +4 −4 sources/assets/Xenko.Core.Assets.Quantum/Xenko.Core.Assets.Quantum.csproj
  33. +17 −0 sources/assets/Xenko.Core.Assets.Tests/TestAssetCloner.cs
  34. +2 −2 sources/assets/Xenko.Core.Assets.Tests/Xenko.Core.Assets.Tests.csproj
  35. +20 −8 sources/assets/Xenko.Core.Assets/AssetCloner.cs
  36. +5 −0 sources/assets/Xenko.Core.Assets/AssetClonerFlags.cs
  37. +2 −2 sources/assets/Xenko.Core.Assets/PackageSession.cs
  38. +7 −10 sources/assets/Xenko.Core.Assets/PackageSessionPublicHelper.cs
  39. +5 −5 sources/assets/Xenko.Core.Assets/Xenko.Core.Assets.csproj
  40. +4 −4 sources/assets/Xenko.Core.Packages/Xenko.Core.Packages.csproj
  41. +2 −2 sources/buildengine/Xenko.Core.BuildEngine.Common/Xenko.Core.BuildEngine.Common.csproj
  42. +2 −2 sources/buildengine/Xenko.Core.BuildEngine.Tests/Xenko.Core.BuildEngine.Tests.csproj
  43. +2 −2 sources/buildengine/Xenko.Core.BuildEngine/Xenko.Core.BuildEngine.csproj
  44. +0 −3 sources/core/Xenko.Core.AssemblyProcessor.Tests/Xenko.Core.AssemblyProcessor.Tests.csproj
  45. +1 −1 sources/core/Xenko.Core.AssemblyProcessor/SerializationProcessor.cs
  46. +3 −14 sources/core/Xenko.Core.AssemblyProcessor/Xenko.Core.AssemblyProcessor.csproj
  47. +2 −2 sources/core/Xenko.Core.Design.Tests/Xenko.Core.Design.Tests.csproj
  48. +12 −25 sources/core/Xenko.Core.Design/VisualStudio/VisualStudioVersions.cs
  49. +3 −3 sources/core/Xenko.Core.Design/Xenko.Core.Design.csproj
  50. +2 −2 sources/core/Xenko.Core.IO/Xenko.Core.IO.csproj
  51. +2 −2 sources/core/Xenko.Core.Mathematics.Tests/Xenko.Core.Mathematics.Tests.csproj
  52. +1 −0 sources/core/Xenko.Core.Serialization/Serialization/Contents/ContentSerializerContext.cs
  53. +19 −0 sources/core/Xenko.Core.Serialization/Serialization/Contents/ReferenceSerializer.cs
  54. +5 −5 sources/core/Xenko.Core.Tasks/Xenko.Core.Tasks.csproj
  55. +2 −2 sources/core/Xenko.Core.Tests/Xenko.Core.Tests.csproj
  56. +2 −2 sources/core/Xenko.Core.Translation/Xenko.Core.Translation.csproj
  57. +2 −2 sources/core/Xenko.Core.Yaml.Tests/Xenko.Core.Yaml.Tests.csproj
  58. +2 −2 sources/core/Xenko.Core.Yaml/Xenko.Core.Yaml.csproj
  59. +4 −2 sources/core/Xenko.Core/Xenko.Core.csproj
  60. +1 −1 sources/editor/Xenko.Assets.Presentation/Quantum/EntityHierarchyPropertyGraph.cs
  61. +7 −8 sources/editor/Xenko.Assets.Presentation/Templates/Core/ProjectLibrary.Game/$ProjectName$.csproj.t4
  62. +3 −3 sources/editor/Xenko.Assets.Presentation/Xenko.Assets.Presentation.csproj
  63. +2 −2 sources/editor/Xenko.Core.Assets.Editor.Tests/Xenko.Core.Assets.Editor.Tests.csproj
  64. +2 −2 sources/editor/Xenko.Core.Assets.Editor/Xenko.Core.Assets.Editor.csproj
  65. +4 −4 sources/editor/Xenko.Editor/Xenko.Editor.csproj
  66. +2 −2 sources/editor/Xenko.GameStudio.Tests/Xenko.GameStudio.Tests.csproj
  67. +5 −0 sources/editor/Xenko.GameStudio/PreviewViewModel.cs
  68. +3 −6 sources/editor/Xenko.GameStudio/Xenko.GameStudio.csproj
  69. +2 −2 sources/engine/Xenko.Assets.Models/Xenko.Assets.Models.csproj
  70. +2 −2 sources/engine/Xenko.Assets.Tests/Xenko.Assets.Tests.csproj
  71. +0 −6 sources/engine/Xenko.Assets.Tests/Xenko.Assets.Tests.props
  72. +2 −2 sources/engine/Xenko.Assets.Tests2/Xenko.Assets.Tests2.csproj
  73. +0 −6 sources/engine/Xenko.Assets.Tests2/Xenko.Assets.Tests2.props
  74. +1 −1 sources/engine/Xenko.Assets/Materials/MaterialAssetCompiler.cs
  75. +4 −4 sources/engine/Xenko.Assets/Xenko.Assets.csproj
  76. +2 −2 sources/engine/Xenko.Audio.Tests/Xenko.Audio.Tests.Windows.csproj
  77. +0 −6 sources/engine/Xenko.Audio.Tests/Xenko.Audio.Tests.props
  78. +2 −2 sources/engine/Xenko.Audio/Xenko.Audio.csproj
  79. +2 −2 sources/engine/Xenko.Debugger/Xenko.Debugger.csproj
  80. +2 −2 sources/engine/Xenko.Engine.Tests/Xenko.Engine.Tests.Windows.csproj
  81. +0 −6 sources/engine/Xenko.Engine.Tests/Xenko.Engine.Tests.props
  82. +15 −26 sources/engine/Xenko.Engine/Engine/Processors/TransformProcessor.cs
  83. +0 −21 sources/engine/Xenko.Engine/Engine/TransformChildrenCollection.cs
  84. +56 −27 sources/engine/Xenko.Engine/Engine/TransformComponent.cs
  85. +2 −2 sources/engine/Xenko.Engine/Xenko.Engine.csproj
  86. +2 −2 sources/engine/Xenko.FontCompiler/Xenko.FontCompiler.csproj
  87. +2 −2 sources/engine/Xenko.Games.Testing/Xenko.Games.Testing.csproj
  88. +2 −2 sources/engine/Xenko.Games/Xenko.Games.csproj
  89. +2 −2 sources/engine/Xenko.Graphics.Regression/Xenko.Graphics.Regression.csproj
  90. +2 −2 sources/engine/Xenko.Graphics.Tests.10_0/Xenko.Graphics.Tests.10_0.Windows.csproj
  91. +0 −6 sources/engine/Xenko.Graphics.Tests.10_0/Xenko.Graphics.Tests.10_0.props
  92. +2 −2 sources/engine/Xenko.Graphics.Tests.11_0/Xenko.Graphics.Tests.11_0.Windows.csproj
  93. +0 −6 sources/engine/Xenko.Graphics.Tests.11_0/Xenko.Graphics.Tests.11_0.props
  94. +2 −2 sources/engine/Xenko.Graphics.Tests/Xenko.Graphics.Tests.Windows.csproj
  95. +0 −6 sources/engine/Xenko.Graphics.Tests/Xenko.Graphics.Tests.props
  96. +2 −3 sources/engine/Xenko.Graphics/PipelineStateDescriptionWithHash.cs
  97. +1 −2 sources/engine/Xenko.Graphics/SDL/Window.cs
  98. +2 −2 sources/engine/Xenko.Graphics/Xenko.Graphics.csproj
  99. +2 −2 sources/engine/Xenko.Input.Tests/Xenko.Input.Tests.Windows.csproj
  100. +0 −6 sources/engine/Xenko.Input.Tests/Xenko.Input.Tests.props
  101. +2 −2 sources/engine/Xenko.Input/Xenko.Input.csproj
  102. +2 −2 sources/engine/Xenko.Native/Xenko.Native.csproj
  103. +2 −2 sources/engine/Xenko.Navigation.Tests/Xenko.Navigation.Tests.Windows.csproj
  104. +0 −6 sources/engine/Xenko.Navigation.Tests/Xenko.Navigation.Tests.props
  105. +2 −2 sources/engine/Xenko.Navigation/Xenko.Navigation.csproj
  106. +2 −2 sources/engine/Xenko.Particles.Tests/Xenko.Particles.Tests.Windows.csproj
  107. +0 −6 sources/engine/Xenko.Particles.Tests/Xenko.Particles.Tests.props
  108. +2 −2 sources/engine/Xenko.Physics.Tests/Xenko.Physics.Tests.Windows.csproj
  109. +0 −6 sources/engine/Xenko.Physics.Tests/Xenko.Physics.Tests.props
  110. +2 −2 sources/engine/Xenko.Physics/Collision.cs
  111. +2 −2 sources/engine/Xenko.Physics/Xenko.Physics.csproj
  112. +2 −0 sources/engine/Xenko.Rendering/Rendering/Materials/MaterialGeneratorContext.cs
  113. +6 −0 sources/engine/Xenko.Rendering/Rendering/Materials/ShaderGeneratorContext.cs
  114. +2 −2 sources/engine/Xenko.Shaders.Compiler/Xenko.Shaders.Compiler.csproj
  115. +2 −2 sources/engine/Xenko.Shaders.Tests/Xenko.Shaders.Tests.Windows.csproj
  116. +2 −2 sources/engine/Xenko.SpriteStudio.Offline/Xenko.SpriteStudio.Offline.csproj
  117. +2 −2 sources/engine/Xenko.UI.Tests/Xenko.UI.Tests.Windows.csproj
  118. +0 −6 sources/engine/Xenko.UI.Tests/Xenko.UI.Tests.props
  119. +2 −2 sources/engine/Xenko.UI/Xenko.UI.csproj
  120. +2 −2 sources/engine/Xenko.Video/Xenko.Video.csproj
  121. +2 −2 sources/engine/Xenko.VirtualReality/Xenko.VirtualReality.csproj
  122. +2 −2 sources/engine/Xenko/Xenko.csproj
  123. +1 −4 sources/launcher/Xenko.Launcher/Services/SelfUpdater.cs
  124. +43 −10 sources/launcher/Xenko.Launcher/ViewModels/LauncherViewModel.cs
  125. +10 −1 sources/launcher/Xenko.Launcher/ViewModels/PackageVersionViewModel.cs
  126. +1 −1 sources/launcher/Xenko.LauncherApp/Xenko.LauncherApp.csproj
  127. +1 −1 sources/launcher/Xenko.LauncherApp/Xenko.LauncherApp.nuspec
  128. +0 −3 sources/prerequisites/BuildTools2017/vs_buildtools.exe
  129. +3 −0 sources/prerequisites/BuildTools2019/vs_buildtools.exe
  130. +2 −2 sources/presentation/Xenko.Core.Presentation.Dialogs/Xenko.Core.Presentation.Dialogs.csproj
  131. +2 −2 sources/presentation/Xenko.Core.Presentation.Graph/Xenko.Core.Presentation.Graph.csproj
  132. +2 −2 ...s/presentation/Xenko.Core.Presentation.Quantum.Tests/Xenko.Core.Presentation.Quantum.Tests.csproj
  133. +2 −2 sources/presentation/Xenko.Core.Presentation.Quantum/Xenko.Core.Presentation.Quantum.csproj
  134. +2 −2 sources/presentation/Xenko.Core.Presentation.Tests/Xenko.Core.Presentation.Tests.csproj
  135. +2 −2 sources/presentation/Xenko.Core.Presentation/Xenko.Core.Presentation.csproj
  136. +2 −2 sources/presentation/Xenko.Core.Quantum.Tests/Xenko.Core.Quantum.Tests.csproj
  137. +2 −2 sources/presentation/Xenko.Core.Quantum/Xenko.Core.Quantum.csproj
  138. +2 −2 sources/presentation/Xenko.Core.Translation.Presentation/Xenko.Core.Translation.Presentation.csproj
  139. +2 −2 sources/shaders/Irony.GrammarExplorer/030.Irony.GrammarExplorer.2010.csproj
  140. +2 −2 sources/tests/tools/Xenko.TextureConverter.Tests/Xenko.TextureConverter.Tests.csproj
  141. +2 −2 sources/tools/MonoDevelop.Debugger.Soft.Xenko/MonoDevelop.Debugger.Soft.Xenko.csproj
  142. +2 −2 sources/tools/Xenko.Assimp/Xenko.Assimp.csproj
  143. +2 −2 sources/tools/Xenko.Code.Tests/Xenko.Code.Tests.csproj
  144. +2 −2 sources/tools/Xenko.ConnectionRouter/Xenko.ConnectionRouter.csproj
  145. +2 −2 sources/tools/Xenko.Core.ConfigEditor/Xenko.Core.ConfigEditor.csproj
  146. +2 −2 sources/tools/Xenko.Core.ProjectTemplating/Xenko.Core.ProjectTemplating.csproj
  147. +2 −2 sources/tools/Xenko.Core.Translation.Extractor/Xenko.Core.Translation.Extractor.csproj
  148. +2 −2 sources/tools/Xenko.DebugTools/Xenko.DebugTools.csproj
  149. +2 −2 sources/tools/Xenko.EffectCompilerServer/Xenko.EffectCompilerServer.csproj
  150. +2 −2 sources/tools/Xenko.ExecServer/Xenko.ExecServer.csproj
  151. +2 −2 sources/tools/Xenko.FixProjectReferences/Xenko.FixProjectReferences.csproj
  152. +2 −2 sources/tools/Xenko.Graphics.RenderDocPlugin/Xenko.Graphics.RenderDocPlugin.csproj
  153. +22 −22 sources/tools/Xenko.PackageInstall/Program.cs
  154. +1 −1 sources/tools/Xenko.PackageInstall/Xenko.PackageInstall.csproj
  155. +3 −3 sources/tools/Xenko.ProjectGenerator/Xenko.ProjectGenerator.csproj
  156. +1 −3 sources/tools/Xenko.PublicApiCheck/Xenko.PublicApiCheck.csproj
  157. +2 −2 sources/tools/Xenko.RemoteShaderCompiler/Xenko.RemoteShaderCompiler.csproj
  158. +2 −2 sources/tools/Xenko.SamplesTestServer/Xenko.SamplesTestServer.csproj
  159. +2 −2 sources/tools/Xenko.StorageTool/Xenko.StorageTool.csproj
  160. +2 −2 sources/tools/Xenko.TestRunner/Xenko.TestRunner.csproj
  161. +2 −2 sources/tools/Xenko.TextureConverter/Xenko.TextureConverter.csproj
  162. +2 −2 sources/tools/Xenko.VisualStudio.Commands/Xenko.VisualStudio.Commands.csproj
  163. +2 −2 sources/tools/Xenko.VisualStudio.Package.Tests/Xenko.VisualStudio.Package.Tests.csproj
  164. +7 −44 sources/tools/Xenko.VisualStudio.Package/Xenko.VisualStudio.Package.csproj
  165. +3 −2 sources/tools/Xenko.VisualStudio.Package/XenkoCommands.cs
  166. +19 −8 sources/tools/Xenko.VisualStudio.Package/XenkoPackage.cs
  167. +3 −3 sources/tools/Xenko.VisualStudio.PackageInstall/Program.cs
@@ -39,11 +39,11 @@ Ask for help or report issues:
### Prerequisites

1. [Git](https://git-scm.com/downloads) (recent version that includes LFS, or install [Git LFS](https://git-lfs.github.com/) separately).
2. [Visual Studio 2017](https://www.visualstudio.com/downloads/) with the following workloads:
2. [Visual Studio 2019](https://www.visualstudio.com/downloads/) with the following workloads:
* `.NET desktop development` with `.NET Framework 4.7.2 targeting pack`
* `Desktop development with C++` with `Windows 10 SDK (10.0.16299)` or later and `VC++ 2017 version 15.9 v14.16 latest v141 tools` or later (both should be enabled by default)
* `Desktop development with C++` with `Windows 10 SDK (10.0.17763.0)` or later, and `VC++ 2017 version 15.9 v14.16 latest v141 tools` or later (both should be enabled by default)
* `.NET Core cross-platform development`
* Optional (to target UWP): `Universal Windows Platform development` with `Windows 10 SDK (10.0.16299.0)` and `Windows 10 SDK (10.0.17134.0)`
* Optional (to target UWP): `Universal Windows Platform development` with `Windows 10 SDK (10.0.17763.0)`
* Optional (to target iOS/Android): `Mobile development with .NET` and `Android NDK R13B+` individual component
3. [FBX SDK 2019.0 VS2015](https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2019-0)

Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,5 +1,5 @@
pushd ..\..\..\bin\iOS-OpenGLES
..\..\deps\Mono.Cecil\monolinker -a Xenko.Engine.dll -a Xenko.Games.dll -a Xenko.Input.dll -a Xenko.Graphics.dll -p link OpenTK-1.1 -u copy -b true -d "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0"
..\..\deps\monolinker\monolinker -a Xenko.Engine.dll -a Xenko.Games.dll -a Xenko.Input.dll -a Xenko.Graphics.dll -p link OpenTK-1.1 -u copy -b true -d "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0"
popd

copy ..\..\..\bin\iOS-OpenGLES\output\OpenTK-1.1.dll .
@@ -3,7 +3,7 @@
<TargetFrameworks>net472</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.7.179" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.0.461" ExcludeAssets="runtime" />
<PackageReference Include="LibGit2Sharp" Version="0.25.3" />
</ItemGroup>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -9,6 +9,7 @@
<PackageReference Include="Xenko.Engine" Version="3.1.0.1-beta01" PrivateAssets="contentfiles;analyzers" />
<PackageReference Include="Xenko.Particles" Version="3.1.0.1-beta01" PrivateAssets="contentfiles;analyzers" />
<PackageReference Include="Xenko.Physics" Version="3.1.0.1-beta01" PrivateAssets="contentfiles;analyzers" />
<PackageReference Include="Xenko.SpriteStudio.Runtime" Version="3.1.0.1-beta01" PrivateAssets="contentfiles;analyzers" />
<PackageReference Include="Xenko.UI" Version="3.1.0.1-beta01" PrivateAssets="contentfiles;analyzers" />
</ItemGroup>
</Project>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -1,7 +1,7 @@
<Project>
<Import Project="..\..\sources\shared\Xenko.NuGetResolver\Xenko.NuGetResolver.projitems" Label="Shared" />
<Import Project="..\..\sources\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
@@ -34,5 +34,5 @@
<ProjectReference Include="..\..\sources\tools\Xenko.SamplesTestServer\Xenko.SamplesTestServer.csproj" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
</Project>
@@ -9,7 +9,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -35,6 +35,7 @@
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<None Include="build\**\*.targets" PackagePath="build\" Pack="true" />
<None Include="build\**\*.targets" PackagePath="buildTransitive\" Pack="true" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\engine\Xenko.Assets.Models\Xenko.Assets.Models.csproj" />
@@ -46,7 +47,7 @@
<Import Project="..\..\tools\Xenko.Core.VisualStudio\Xenko.Core.VisualStudio.projitems" Label="Shared" />
<Import Project="..\..\shared\Xenko.NuGetResolver\Xenko.NuGetResolver.projitems" Label="Shared" />
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />

<PropertyGroup>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.config</AllowedOutputExtensionsInPackageBuildOutputFolder>
@@ -1,6 +1,6 @@
<Project>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
<PropertyGroup>
<XenkoAssemblyProcessor>false</XenkoAssemblyProcessor>
<OutputType>Exe</OutputType>
@@ -28,5 +28,5 @@
<ProjectReference Include="..\..\tools\Xenko.ExecServer\Xenko.ExecServer.csproj" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
</Project>
@@ -1,6 +1,6 @@
<Project>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
<PropertyGroup>
<XenkoAssemblyProcessor>true</XenkoAssemblyProcessor>
<TargetFramework>$(TargetFrameworkTool)</TargetFramework>
@@ -42,5 +42,5 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
</Project>
@@ -1,6 +1,6 @@
<Project>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
@@ -13,8 +13,8 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="Microsoft.Build" Version="15.7.179" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.7.179" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build" Version="16.0.461" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.0.461" ExcludeAssets="runtime" />
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.DataAnnotations" />
@@ -38,5 +38,5 @@
<ProjectReference Include="..\Xenko.Core.Assets\Xenko.Core.Assets.csproj" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
</Project>
@@ -11,6 +11,15 @@

namespace Xenko.Core.Assets.Tests
{
[DataContract, ReferenceSerializer, DataSerializerGlobal(typeof(ReferenceSerializer<TestContent>), Profile = "Content")]
public class TestContent { }

[DataContract("TestAssetClonerContent")]
public class TestAssetClonerContent
{
public TestContent Content;
}

[DataContract("TestAssetClonerObject")]
public class TestAssetClonerObject
{
@@ -38,6 +47,14 @@ public class TestObjectReference

public class TestAssetCloner
{
[Fact]
public void TestAssetClonerContent()
{
var obj1 = new TestAssetClonerContent { Content = new TestContent() };
var obj2 = AssetCloner.Clone(obj1, AssetClonerFlags.KeepReferences);
Assert.Equal(obj1.Content, obj2.Content);
}

[Fact]
public void TestHash()
{
@@ -1,6 +1,6 @@
<Project>
<Import Project="..\..\targets\Xenko.PreSettings.targets" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.props" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<XenkoAssemblyProcessor>true</XenkoAssemblyProcessor>
@@ -75,5 +75,5 @@
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(XenkoPostSettingsTargets)" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="1.6.65" />
<Import Project="Sdk.targets" Sdk="MSBuild.Sdk.Extras" Version="2.0.24" />
</Project>
@@ -31,6 +31,7 @@ public class AssetCloner
private Dictionary<Guid, Guid> cloningIdRemapping;
public static SerializerSelector ClonerSelector { get; internal set; }
public static PropertyKey<List<object>> InvariantObjectListProperty = new PropertyKey<List<object>>("InvariantObjectList", typeof(AssetCloner));
private List<object> cloneReferences;

static AssetCloner()
{
@@ -62,11 +63,8 @@ private AssetCloner(object value, AssetClonerFlags flags, IEnumerable<IIdentifia
var stream = new MemoryStream();
var writer = new BinarySerializationWriter(stream);
writer.Context.SerializerSelector = ClonerSelector;
var refFlag = (flags & AssetClonerFlags.ReferenceAsNull) != 0
? ContentSerializerContext.AttachedReferenceSerialization.AsNull
: ContentSerializerContext.AttachedReferenceSerialization.AsSerializableVersion;
writer.Context.Set(InvariantObjectListProperty, invariantObjects);
writer.Context.Set(ContentSerializerContext.SerializeAttachedReferenceProperty, refFlag);
writer.Context.Set(ContentSerializerContext.SerializeAttachedReferenceProperty, GenerateContentSerializerFlags(flags));
if (externalIdentifiables != null)
{
this.externalIdentifiables = new Dictionary<Guid, IIdentifiable>();
@@ -80,6 +78,9 @@ private AssetCloner(object value, AssetClonerFlags flags, IEnumerable<IIdentifia
writer.SerializeExtended(value, ArchiveMode.Serialize);
writer.Flush();

if ((flags & AssetClonerFlags.KeepReferences) != 0)
cloneReferences = writer.Context.Get(ReferenceSerializer.CloneReferences);

// Retrieve back all object references that were discovered while serializing
// They will be used layer by OnObjectDeserialized when cloning ShadowObject datas
var objectRefs = writer.Context.Get(MemberSerializer.ObjectSerializeReferences);
@@ -113,18 +114,17 @@ private object Clone([NotNull] out Dictionary<Guid, Guid> idRemapping)
stream.Position = 0;
var reader = new BinarySerializationReader(stream);
reader.Context.SerializerSelector = ClonerSelector;
var refFlag = (flags & AssetClonerFlags.ReferenceAsNull) != 0
? ContentSerializerContext.AttachedReferenceSerialization.AsNull
: ContentSerializerContext.AttachedReferenceSerialization.AsSerializableVersion;
reader.Context.Set(InvariantObjectListProperty, invariantObjects);
reader.Context.Set(ContentSerializerContext.SerializeAttachedReferenceProperty, refFlag);
reader.Context.Set(ContentSerializerContext.SerializeAttachedReferenceProperty, GenerateContentSerializerFlags(flags));
if (externalIdentifiables != null)
{
if ((flags & AssetClonerFlags.ClearExternalReferences) != 0)
externalIdentifiables.Clear();

reader.Context.Set(MemberSerializer.ExternalIdentifiables, externalIdentifiables);
}
if ((flags & AssetClonerFlags.KeepReferences) != 0)
reader.Context.Set(ReferenceSerializer.CloneReferences, cloneReferences);
reader.Context.Set(MemberSerializer.ObjectDeserializeCallback, OnObjectDeserialized);
object newObject = null;
reader.SerializeExtended(ref newObject, ArchiveMode.Deserialize);
@@ -317,6 +317,18 @@ internal static ObjectId ComputeHash(object asset, AssetClonerFlags flags = Asse
return result;
}

private static ContentSerializerContext.AttachedReferenceSerialization GenerateContentSerializerFlags(AssetClonerFlags flags)
{
ContentSerializerContext.AttachedReferenceSerialization refFlag;
if ((flags & AssetClonerFlags.ReferenceAsNull) != 0)
refFlag = ContentSerializerContext.AttachedReferenceSerialization.AsNull;
else if ((flags & AssetClonerFlags.KeepReferences) != 0)
refFlag = ContentSerializerContext.AttachedReferenceSerialization.Clone;
else
refFlag = ContentSerializerContext.AttachedReferenceSerialization.AsSerializableVersion;
return refFlag;
}

private class UnloadableCloneSerializer<T> : DataSerializer<T> where T : class, IUnloadable
{
private DataSerializer parentSerializer;
@@ -40,5 +40,10 @@ public enum AssetClonerFlags
/// Clears any external references in the cloned object
/// </summary>
ClearExternalReferences = 16,

/// <summary>
/// Attached references will be kept as is
/// </summary>
KeepReferences = 32,
}
}
@@ -404,10 +404,10 @@ public sealed partial class PackageSession : IDisposable, IAssetFinder
/// <summary>
/// The visual studio version property used for newly created project solution files
/// </summary>
public static readonly Version DefaultVisualStudioVersion = new Version("14.0.23107.0");
public static readonly Version DefaultVisualStudioVersion = new Version("16.0.0.0");

internal static readonly string SolutionHeader = @"Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
# Visual Studio 16
VisualStudioVersion = {0}
MinimumVisualStudioVersion = {0}".ToFormat(DefaultVisualStudioVersion);

0 comments on commit 3be3ca7

Please sign in to comment.
You can’t perform that action at this time.