Hi,
I’m new to DOTS/ECS, I write a scene for my game based on the DOTS, and it works properly in the editor. However, while I build the project, it only shows the blue background and did not show anything else(player, monsters)
Did I miss anything?
I do get several warning:
Unable to find player assembly: C:\Game\project\standard\standard7\Temp\StagingArea\Data\Managed\UnityEngine.TestRunner.dll
UnityEngine.Debug:LogWarning (object)
Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:350)
Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:208)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
A call to the method System.IntPtr.op_Explicit(long value) → System.IntPtr_174498003676a21dd9c14399f2a0b6f3 has been discarded, due to its use as an argument to a discarded method. Please see the user manual for ways to prevent this, or for how to disable this warning in this case.
at Unity.Entities.SystemBaseRegistry.CallForwardingFunction(Unity.Entities.SystemState* systemState, int functionIndex) (at C:\Game\project\standard\standard7\Library\PackageCache\com.unity.entities@0.51.0-preview.32\Unity.Entities\SystemBaseRegistry.cs:308)
at Unity.Entities.SystemBaseRegistry.CallOnUpdate(Unity.Entities.SystemState* systemState) (at C:\Game\project\standard\standard7\Library\PackageCache\com.unity.entities@0.51.0-preview.32\Unity.Entities\SystemBaseRegistry.cs:348)
at Unity.Entities.SystemBase.UnmanagedUpdate$BurstManaged(System.IntPtr pSystemState, ref Unity.Entities.SystemDependencySafetyUtility.SafetyErrorDetails errorDetails) (at C:\Game\project\standard\standard7\Library\PackageCache\com.unity.entities@0.51.0-preview.32\Unity.Entities\SystemBase.cs:449)
at Unity.Entities.SystemBase.Unity.Entities.UnmanagedUpdate_00000F22$BurstDirectCall.Invoke(System.IntPtr pSystemState, ref Unity.Entities.SystemDependencySafetyUtility.SafetyErrorDetails errorDetails)
at Unity.Entities.SystemBase.UnmanagedUpdate(System.IntPtr pSystemState, ref Unity.Entities.SystemDependencySafetyUtility.SafetyErrorDetails errorDetails) (at C:\Game\project\standard\standard7\Library\PackageCache\com.unity.entities@0.51.0-preview.32\Unity.Entities\SystemBase.cs:430)
Did you built any project before in Unity?
Did you attach the scene in the builder menu?
Which Unity version you are using?
Which packages you are using?
I build a project in Unity 2018 before. I attach the scene in the build setting. And I use Unity 2021.3.4f1 as the editor, And I use following packages:
Is this your first error in build?
“Unable to find player assembly:”
It looks like you got files missing. I am not sure if is DOTS related.
You may need create smallest reproducable case.
For example, disable system, build game, and see if error happens.
I don’t see the ‘Platforms’ package…
https://docs.unity3d.com/Packages/com.unity.entities@0.51/manual/ecs_building_projects.html
the platform package was not shown in the screenshot. It has been installed as a dependency of hybrid rendering. But I have to admit that I did not notice that ECS needs to be built with extra steps.
There is a known issue for the IL2CPP build where you need to select “Faster (smaller) builds” as the option for IL2CPP Code Generation in the ‘old build settings’ window. The other build settings can be done by creating a new build configuration.
I only do Windows builds, so might be more/different issues for other stuff.