Search Unity

Official Entities 0.17 changelog

Discussion in 'Entity Component System' started by Brian_Will, Dec 10, 2020.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,128
    I see. You can refer to Case 1308787. When u enter play mode then press button, you will see there is particle system has been spawned immediately at position (0,0,0) that shouldn't spawn. I believe it's caused by GhostCollection prefab that reference the ghost with as long as it has particle system hybrid component. Btw I also want to know the progress of this case. I believe this case is another Entities package bug that links with IL2CPP.
     
    Last edited: Feb 1, 2021
  2. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    Sounds like the same issue then, and should be resolved with my fix. The bug was essentially Prefabs as references on Entity components getting instantiated by the code that creates Hybrid Component companion objects by mistake. So any kind of Prefab reference on a managed component would fail in an Entity Scene.

    This second case is still in QA processing.
     
    optimise likes this.
  3. bartofzo

    bartofzo

    Joined:
    Mar 16, 2017
    Posts:
    151
    Having the same problem when using a BlobArray<T> where T is constrained to a struct... I have quite a lot of code that is dependant on this working, is it safe to assume it should be OK in future updates?
     
  4. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    @eizenhorn, @bartofzo - have y'all tried using the unmanaged constraint qualifier for T value with blob generics?
     
  5. djsell

    djsell

    Joined:
    Aug 29, 2013
    Posts:
    77
    Yes. The sample code showed unmanaged constraint. I have the same problem, also using unmanaged constraint.
     
  6. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
  7. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,683
    According to @s_schoener it will.
    "0.18 has a mitigation, proper fix via interface does not have an ETA yet"
    . Unity aware of this problem. For now, you can comment out loop on line
    149
    in
    BlobAssetSafetyVerifier.cs
     
  8. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,128
    Hi @topher_r. Just update you about second case (Case 1308787) I get the following log. Seems like it's bug related to DOTS Physics and Burst.

    The method `Void _mono_to_burst_Hash64Long(Byte*, Byte*, Int64, Byte*, UInt64 ByRef)` must have `MonoPInvokeCallback` attribute to be compatible with IL2CPP!
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    Unity.Burst.BurstCompiler:Compile(T, Boolean)
    Unity.Collections.xxHash3:.cctor()
    Unity.Physics.Authoring.BeginColliderConversionSystem:OnCreate()
    Unity.Entities.ComponentSystemBase:CreateInstance(World, SystemState*)
    Unity.Entities.World:AddSystem_OnCreate_Internal(ComponentSystemBase)
    Unity.Entities.World:CreateSystemInternal(Type)
    Unity.Entities.World:GetOrCreateSystem(Type)
    Unity.Entities.GameObjectConversionUtility:AddSystemAndLogException(World, ComponentSystemGroup, Type)
    Unity.Entities.GameObjectConversionUtility:AddConversionSystems(World, IEnumerable`1, Boolean, Boolean)
    Unity.Entities.GameObjectConversionUtility:CreateConversionWorld(GameObjectConversionSettings, Scene)
    Unity.Entities.ConvertToEntitySystem:Convert()
    Unity.Entities.ComponentSystem:Update()
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    Unity.Entities.ComponentSystem:Update()
    UnityEngine.LowMemoryCallback:Invoke()

    The method `Void _mono_to_burst_Hash128Long(Byte*, Byte*, Int64, Byte*, Unity.Mathematics.uint4 ByRef)` must have `MonoPInvokeCallback` attribute to be compatible with IL2CPP!
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    Unity.Burst.BurstCompiler:Compile(T, Boolean)
    Unity.Collections.xxHash3:.cctor()
    Unity.Physics.Authoring.BeginColliderConversionSystem:OnCreate()
    Unity.Entities.ComponentSystemBase:CreateInstance(World, SystemState*)
    Unity.Entities.World:AddSystem_OnCreate_Internal(ComponentSystemBase)
    Unity.Entities.World:CreateSystemInternal(Type)
    Unity.Entities.World:GetOrCreateSystem(Type)
    Unity.Entities.GameObjectConversionUtility:AddSystemAndLogException(World, ComponentSystemGroup, Type)
    Unity.Entities.GameObjectConversionUtility:AddConversionSystems(World, IEnumerable`1, Boolean, Boolean)
    Unity.Entities.GameObjectConversionUtility:CreateConversionWorld(GameObjectConversionSettings, Scene)
    Unity.Entities.ConvertToEntitySystem:Convert()
    Unity.Entities.ComponentSystem:Update()
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    Unity.Entities.ComponentSystem:Update()
    UnityEngine.LowMemoryCallback:Invoke()
     
  9. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    @optimise Just to confirm, this fix will be in 0.18.
     
    Neil-Corre, vladlomakin and optimise like this.
  10. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    My linux server build(mono) always random crashes after update to 0.17.like this:
    Code (CSharp):
    1. Caught fatal signal - signo:11 code:128 errno:0 addr:(nil)
    2. Obtained 9 stack frames.
    3. #0  0x007fba30863630 in _L_unlock_13
    4. #1  0x007fb97e83f35e in (Unknown)
    5. #2  0x007fb97e83eb8e in (Unknown)
    6. #3  0x007fb97e83ec68 in (Unknown)
    7. #4  0x007fb97e852985 in (Unknown)
    8. #5  0x007fb97e84a530 in (Unknown)
    9. #6  0x007fb97e874e16 in (Unknown)
    10. #7  0x007fb97eabb6b7 in (Unknown)
    11. #8  0x0000004119b864 in (wrapper managed-to-native) object:wrapper_native_0x7fb97eabb6b0 (intptr,intptr,int)
    12.  
    Anybody know why?
    My unity version is 2020.2.2f1c1
    package:
    Code (CSharp):
    1. {
    2.   "dependencies": {
    3.     "com.unity.animation": "0.9.0-preview.6",
    4.     "com.unity.burst": "1.4.4",
    5.     "com.unity.cinemachine": "2.5.0",
    6.     "com.unity.dots.editor": "0.12.0-preview.6",
    7.     "com.unity.entities": "0.17.0-preview.41",
    8.     "com.unity.ide.visualstudio": "2.0.5",
    9.     "com.unity.inputsystem": "1.0.2",
    10.     "com.unity.mobile.android-logcat": "1.1.1",
    11.     "com.unity.performance.profile-analyzer": "1.0.3",
    12.     "com.unity.postprocessing": "2.3.0",
    13.     "com.unity.render-pipelines.universal": "10.2.2",
    14.     "com.unity.rendering.hybrid": "0.11.0-preview.42",
    15.     "com.unity.test-framework.performance": "2.3.1-preview",
    16.     "com.unity.textmeshpro": "3.0.1",
    17.     "com.unity.timeline": "1.3.6",
    18.     "com.unity.ugui": "1.0.0",
    19.     "com.unity.modules.ai": "1.0.0",
    20.     "com.unity.modules.androidjni": "1.0.0",
    21.     "com.unity.modules.animation": "1.0.0",
    22.     "com.unity.modules.assetbundle": "1.0.0",
    23.     "com.unity.modules.audio": "1.0.0",
    24.     "com.unity.modules.cloth": "1.0.0",
    25.     "com.unity.modules.director": "1.0.0",
    26.     "com.unity.modules.imageconversion": "1.0.0",
    27.     "com.unity.modules.imgui": "1.0.0",
    28.     "com.unity.modules.jsonserialize": "1.0.0",
    29.     "com.unity.modules.particlesystem": "1.0.0",
    30.     "com.unity.modules.physics": "1.0.0",
    31.     "com.unity.modules.physics2d": "1.0.0",
    32.     "com.unity.modules.screencapture": "1.0.0",
    33.     "com.unity.modules.terrain": "1.0.0",
    34.     "com.unity.modules.terrainphysics": "1.0.0",
    35.     "com.unity.modules.tilemap": "1.0.0",
    36.     "com.unity.modules.ui": "1.0.0",
    37.     "com.unity.modules.uielements": "1.0.0",
    38.     "com.unity.modules.umbra": "1.0.0",
    39.     "com.unity.modules.unityanalytics": "1.0.0",
    40.     "com.unity.modules.unitywebrequest": "1.0.0",
    41.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    42.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    43.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    44.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    45.     "com.unity.modules.vehicles": "1.0.0",
    46.     "com.unity.modules.video": "1.0.0",
    47.     "com.unity.modules.vr": "1.0.0",
    48.     "com.unity.modules.wind": "1.0.0",
    49.     "com.unity.modules.xr": "1.0.0"
    50.   }
    51. }
    52.  
     
    Last edited: Feb 8, 2021
  11. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,128
    @topher_r Can I know the ETA of 0.18?
     
  12. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    991
    We just got 17 but yeah I'd like to have an ETA on 18 too :p
     
  13. robert12342

    robert12342

    Joined:
    Jun 11, 2018
    Posts:
    29
    Hi, my SubScene stopped working after the unity 2020.2.3f1 update
    upload_2021-2-9_18-35-18.png upload_2021-2-9_18-35-39.png
     
  14. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    855
  15. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    991
    Maybe bu not sure. When I upgraded to 2020.2.3f1 UITK and uGUI raised errors and were not comaptible, so he most likely don't have the UITK in project.

    Anyway, I would suggest to post a bug report. You can reference the ticket number I gave in the other post in your report has we have the same error message. Maybe it wil help Unity pinpoint the issue.
     
  16. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    Since ISystemBase is a struct, I assume I can't use it on subclass and/or generic systems?

    How one would go about to convert these to use ISystemBase?
    Code (CSharp):
    1. public class ProcessResourceBuffer<B, BMul, BM, PUB, STD> : JobComponentSystem
    2.     where B : struct, IComponentData, IValue<float>
    3.     where BMul : struct, IComponentData, IValue<float>
    4.     where BM : struct, IComponentData, IValue<float>
    5.     where STD : struct, IComponentData, IValue<bool>
    6.     where PUB : struct, IComponentData, IValue<bool> {
    7.     public EntityQuery query;
    8.     protected override void OnCreate() {
    9.         base.OnCreate();
    10.         query = GetEntityQuery(ComponentType.ReadOnly<BM>(), ComponentType.ReadOnly<BMul>(), typeof(B), typeof(STD), typeof(PlantUsingPIBuffer), typeof(PUB));
    11.     }
    12.  
    13.     [BurstCompile]
    14.     struct ProcessNutrientBufferJob : IJobChunk {
    15.         public float DayFrameDiftime;
    16.         [ReadOnly] public ComponentTypeHandle<BM> BM;
    17.         [ReadOnly] public ComponentTypeHandle<BMul> BMul;
    18.         [NativeDisableParallelForRestriction] public ComponentTypeHandle<B> B;
    19.         [NativeDisableParallelForRestriction] public ComponentTypeHandle<PUB> PUB;
    20.         [NativeDisableParallelForRestriction] public ComponentTypeHandle<STD> STD;
    21.  
    22.         public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex) {
    23.             var B = chunk.GetNativeArray(this.B).Reinterpret<float>();
    24.             var BM = chunk.GetNativeArray(this.BM).Reinterpret<float>();
    25.             var BMul = chunk.GetNativeArray(this.BMul).Reinterpret<float>();
    26.             var PUB = chunk.GetNativeArray(this.PUB).Reinterpret<bool>();
    27.             var STD = chunk.GetNativeArray(this.STD).Reinterpret<bool>();
    28.             for (int i = 0; i < chunk.Count; i++) {
    29.                 if (PUB[i]) {
    30.                     B[i] -= DayFrameDiftime * BMul[i];
    31.                     if (B[i] <= 0) {
    32.                         B[i] = 0;
    33.                         STD[i] = PUB[i];
    34.                         PUB[i] = false;
    35.                     }
    36.                 } else {
    37.                     B[i] += DayFrameDiftime * BMul[i];
    38.                     if (B[i] > BM[i]) {
    39.                         B[i] = BM[i];
    40.                     }
    41.                     STD[i] = false;
    42.                 }
    43.             }
    44.         }
    45.     }
    46.  
    47.     protected override JobHandle OnUpdate(JobHandle inputDependencies) {
    48.         var job = new ProcessNutrientBufferJob();
    49.         job.DayFrameDiftime = Time.DeltaTime * StaticFlags.GameEngine_TimeFactor;
    50.         job.B = GetComponentTypeHandle<B>(false);
    51.         job.BMul = GetComponentTypeHandle<BMul>(false);
    52.         job.BM = GetComponentTypeHandle<BM>(true);
    53.         job.PUB = GetComponentTypeHandle<PUB>(false);
    54.         job.STD = GetComponentTypeHandle<STD>(false);
    55.         return job.Schedule(query, inputDependencies);
    56.     }
    57. }

    Code (CSharp):
    1. [UpdateAfter(typeof(ConfirmSoilTemperature))]
    2. [UpdateInGroup(typeof(GroupPlantApplyUpkeeps))]
    3. public class ProcessTemperatureBuffer : ProcessResourceBuffer<PlantTemperatureBuffer, PlantTemperatureBufferMultiplier, PlantTemperatureBufferMax, PlantUsingTEMPBuffer, PlantShouldTakeTEMPDamage> { }
    4.  
    5. [UpdateAfter(typeof(ConfirmSoilWater))]
    6. [UpdateInGroup(typeof(GroupPlantApplyUpkeeps))]
    7. public class ProcessWaterBuffer : ProcessResourceBuffer<PlantWaterBuffer, PlantWaterBufferMultiplier, PlantWaterBufferMax, PlantUsingWATERBuffer, PlantShouldTakeWATERDamage> { }
    Edit: I have a whole bunch (maybe upwards of 50% of my systems) that are just empty implementations of generic systems like the above examples.
     
  17. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    I haven't played around much with ISystemBase, but until default interface implementation comes to Unity I think you could change to something like the following:

    warning: notepad codding ahead, may contain typos lol

    Code (CSharp):
    1.     public static class ProcessResourceBuffer<B, BMul, BM, PUB, STD>
    2.         where B : struct, IComponentData, IValue<float>
    3.         where BMul : struct, IComponentData, IValue<float>
    4.         where BM : struct, IComponentData, IValue<float>
    5.         where STD : struct, IComponentData, IValue<bool>
    6.         where PUB : struct, IComponentData, IValue<bool> {
    7.  
    8.         public static readonly ComponentType[] ComponentTypes = new ComponentType[] { ComponentType.ReadOnly<BM>(), ComponentType.ReadOnly<BMul>(), typeof(B), typeof(STD), typeof(PlantUsingPIBuffer), typeof(PUB) };
    9.  
    10.         public static void OnCreate(ref SystemState systemState) {
    11.             // to ensure that we will cache it before the first update
    12.             systemState.GetEntityQuery(ComponentTypes);
    13.         }
    14.    
    15.         [BurstCompile]
    16.         struct ProcessNutrientBufferJob : IJobChunk {
    17.             public float DayFrameDiftime;
    18.             [ReadOnly] public ComponentTypeHandle<BM> BM;
    19.             [ReadOnly] public ComponentTypeHandle<BMul> BMul;
    20.             [NativeDisableParallelForRestriction] public ComponentTypeHandle<B> B;
    21.             [NativeDisableParallelForRestriction] public ComponentTypeHandle<PUB> PUB;
    22.             [NativeDisableParallelForRestriction] public ComponentTypeHandle<STD> STD;
    23.    
    24.             public void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex) {
    25.                 var B = chunk.GetNativeArray(this.B).Reinterpret<float>();
    26.                 var BM = chunk.GetNativeArray(this.BM).Reinterpret<float>();
    27.                 var BMul = chunk.GetNativeArray(this.BMul).Reinterpret<float>();
    28.                 var PUB = chunk.GetNativeArray(this.PUB).Reinterpret<bool>();
    29.                 var STD = chunk.GetNativeArray(this.STD).Reinterpret<bool>();
    30.                 for (int i = 0; i < chunk.Count; i++) {
    31.                     if (PUB[i]) {
    32.                         B[i] -= DayFrameDiftime * BMul[i];
    33.                         if (B[i] <= 0) {
    34.                             B[i] = 0;
    35.                             STD[i] = PUB[i];
    36.                             PUB[i] = false;
    37.                         }
    38.                     } else {
    39.                         B[i] += DayFrameDiftime * BMul[i];
    40.                         if (B[i] > BM[i]) {
    41.                             B[i] = BM[i];
    42.                         }
    43.                         STD[i] = false;
    44.                     }
    45.                 }
    46.             }
    47.         }
    48.    
    49.         public static void OnUpdate(ref SystemState systemState) {
    50.             var job = new ProcessNutrientBufferJob();
    51.             job.DayFrameDiftime = systemState.Time.DeltaTime * StaticFlags.GameEngine_TimeFactor;
    52.             job.B = systemState.GetComponentTypeHandle<B>(false);
    53.             job.BMul = systemState.GetComponentTypeHandle<BMul>(false);
    54.             job.BM = systemState.GetComponentTypeHandle<BM>(true);
    55.             job.PUB = systemState.GetComponentTypeHandle<PUB>(false);
    56.             job.STD = systemState.GetComponentTypeHandle<STD>(false);
    57.  
    58.             var query = systemState.GetEntityQuery(ComponentTypes);
    59.  
    60.             // instead of retuning a JobHandle, use the Dependency property
    61.             systemState.Dependency = job.Schedule(query, systemState.Dependency);
    62.         }
    63.     }
    And use it like that:
    Code (CSharp):
    1.     using ProcessTemperaturBufferImplementation = ProcessResourceBuffer<PlantTemperatureBuffer, PlantTemperatureBufferMultiplier, PlantTemperatureBufferMax, PlantUsingTEMPBuffer, PlantShouldTakeTEMPDamage>;
    2.  
    3.     [UpdateAfter(typeof(ConfirmSoilTemperature))]
    4.     [UpdateInGroup(typeof(GroupPlantApplyUpkeeps))]
    5.     public struct ProcessTemperatureBuffer : ISystemBase
    6.     {
    7.         public void OnCreate(ref SystemState systemState()
    8.         {
    9.              ProcessTemperaturBufferImplementation.OnCreate(ref systemState);
    10.         }
    11.  
    12.         public void OnUpdate(ref SystemState systemState()
    13.         {
    14.              ProcessTemperaturBufferImplementation.OnUpdate(ref systemState);
    15.         }
    16.     }
    17.  
    18.     using ProcessWaterBufferImplementation = ProcessResourceBuffer<PlantWaterBuffer, PlantWaterBufferMultiplier, PlantWaterBufferMax, PlantUsingWATERBuffer, PlantShouldTakeWATERDamage>;
    19.    
    20.     [UpdateAfter(typeof(ConfirmSoilWater))]
    21.     [UpdateInGroup(typeof(GroupPlantApplyUpkeeps))]
    22.     public struct ProcessWaterBuffer : ISystemBase
    23.     {
    24.         public void OnCreate(ref SystemState systemState()
    25.         {
    26.              ProcessWaterBufferImplementation.OnCreate(ref systemState);
    27.         }
    28.  
    29.         public void OnUpdate(ref SystemState systemState()
    30.         {
    31.              ProcessWaterBufferImplementation.OnUpdate(ref systemState);
    32.         }
    33.     }
    34.  
    You will also want to add the [BurstCompile] attributes everywhere lol
     
    Guedez likes this.
  18. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    That might actually work, will try it out when I next update my project
     
  19. unity-freestyle

    unity-freestyle

    Joined:
    Aug 26, 2015
    Posts:
    45
    Hi,

    anyone managed to use the new .WithFilter feature?

    Thanks.
     
    jdtec likes this.
  20. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    I would like to use the .WithFilter. I found it in the entities package and noticed it's on a define:

    #if ROSLYN_SOURCEGEN_ENABLED
    public static ForEachLambdaJobDescription WithFilter(this ForEachLambdaJobDescription description, [AllowDynamicValue]Unity.Collections.NativeArray<Entity> entities) => description;
    #endif
     
    unity-freestyle likes this.
  21. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,128
    Hi @Brian_Will, @topher_r. Recently I found something that most probably related to Android il2cpp build crash bug at following spoiler. I reproduce it with Android Develop build but not sure how to reproduce it again. You can refer to case 1315007. Any idea for this error spamming?

    Another 2 crashes I believe is other bugs that I found in other project. For Android Logcat (Release) seems like caused by Entities package bug meanwhile Android Logcat for develop build seems like caused by DOTS Physics package bug. You can refer to Case 1315723.

    AssertionException: Assertion failure. Values are not equal.
    Expected: 18446744072302369064 == 2887784744
    UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <00000000000000000000000000000000>:0)
    UnityEngine.Assertions.Assert.AreEqual[T] (T expected, T actual, System.String message, System.Collections.Generic.IEqualityComparer`1[T] comparer) (at <00000000000000000000000000000000>:0)
    UnityEngine.Assertions.Assert.AreEqual[T] (T expected, T actual, System.String message) (at <00000000000000000000000000000000>:0)
    UnityEngine.Assertions.Assert.AreEqual[T] (T expected, T actual) (at <00000000000000000000000000000000>:0)
    Unity.Assertions.Assert.AreEqual[T] (T expected, T actual) (at <00000000000000000000000000000000>:0)
    Unity.Entities.Archetype.EmptySlotTrackingAddChunk (Unity.Entities.Chunk* chunk) (at <00000000000000000000000000000000>:0)
    Unity.Entities.ChunkDataUtility.AddEmptyChunk (Unity.Entities.Archetype* archetype, Unity.Entities.Chunk* chunk, Unity.Entities.SharedComponentValues sharedComponentValues) (at <00000000000000000000000000000000>:0)
    Unity.Entities.EntityComponentStore.GetCleanChunk (Unity.Entities.Archetype* archetype, Unity.Entities.SharedComponentValues sharedComponentValues) (at <00000000000000000000000000000000>:0)
    Unity.Entities.EntityComponentStore.GetChunkWithEmptySlots (Unity.Entities.EntityComponentStore+ArchetypeChunkFilter& archetypeChunkFilter) (at <00000000000000000000000000000000>:0)
    Unity.Entities.EntityComponentStore.CreateEntities (Unity.Entities.Archetype* archetype, Unity.Entities.Entity* entities, System.Int32 count) (at <00000000000000000000000000000000>:0)
    Unity.Entities.EntityDataAccess.CreateEntity (Unity.Entities.EntityArchetype archetype) (at <00000000000000000000000000000000>:0)
    Unity.Entities.EntityManager.CreateEntity (Unity.Entities.ComponentType[] types) (at <00000000000000000000000000000000>:0)
    Unity.Entities.World.get_TimeSingleton () (at <00000000000000000000000000000000>:0)
    Unity.Entities.World.PushTime (Unity.Core.TimeData newTimeData) (at <00000000000000000000000000000000>:0)
    Unity.NetCode.ClientSimulationSystemGroup.OnUpdate () (at <00000000000000000000000000000000>:0)
    Unity.Entities.ComponentSystem.Update () (at <00000000000000000000000000000000>:0)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at <00000000000000000000000000000000>:0)
    Unity.Entities.ComponentSystem.Update () (at <00000000000000000000000000000000>:0)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at <00000000000000000000000000000000>:0)
    Unity.Entities.ComponentSystem.Update () (at <00000000000000000000000000000000>:0)
    UnityEngine.LowLevel.PlayerLoopSystem+UpdateFunction.Invoke () (at <00000000000000000000000000000000>:0)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    Unity.Entities.ComponentSystem:Update()
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
    Unity.Entities.ComponentSystem:Update()
    UnityEngine.LowLevel.UpdateFunction:Invoke()
     

    Attached Files:

    Last edited: Feb 18, 2021
  22. UsmanMemon

    UsmanMemon

    Joined:
    Jan 24, 2020
    Posts:
    87
  23. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    seems that 0.17 is trouble with IL2CPP??

    i'm using 2020.2.5 + burst 1.4.1 + urp 10.3.1 + jobs 0.8 p2 + entities 0.17 p41 ...
    everything are working good on IL2CPP without using entities ...
    but with enities just working on mono ... got crash on IL2CPP
     
  24. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    What platform? I updated our main project from 2020.1 and 0.16 to 2020.2 and 0.17 on a branch last friday and it's been running fine on windows il2cpp. Testing is still pending but I'm not really noticing any major issues.
     
  25. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    i tested for Android [arm v7 and v8] and PC x64 ...
     
  26. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    I should point out though this project is pretty old now and doesn't use the conversion workflow so if there are issues in there we wouldn't be experiencing them.

    I have seen a lot of android issues posted on the forums though but we aren't targeting mobile platforms. I'm in process of making an xbox build at the moment to test this branch, so shall see how that goes I guess.
     
  27. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    411
    just for clarify!!

    downgrade entities to 0.16 p21 + Burst 1.3.7 and everything are working great on IL2CPP!!
     
  28. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    260
    I've compiled for Windows x64 + Entities .17 with IL2CPP without any issues using the conversion workflow and subscenes. I am using the hybrid renderer V2 and Unity Physics in the project.
     
  29. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    Code (CSharp):
    1. com.unity.entities@0.17.0-preview.41\Unity.Entities\EntityManagerChangeArchetype.cs(345,17): Burst error BC1001: Unable to access the managed method `object.ToString()` from type `Unity.Entities.ComponentType`
    I have a system extends ISystemBase use EntityManager.AddComponent<T>(NativeArray<Entity>),burst throw this exception,but removeComponent work fine.
    Is this a bug?
     
  30. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    I can tell you it will be out before 0.19 ;)

    At the moment we are pretty much always working towards the next release, but we have a lot of dots packages that get validated together so this takes some time. I can't give a date, because we don't have a strict one, but it shouldn't be long.
     
    Occuros, vladlomakin, NotaNaN and 7 others like this.
  31. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    Will 0.18 full support for ISystembase?
     
  32. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,128
    @topher_r Can u make sure these 2 bugs will be fixed at 0.18?

     
  33. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    The first one just looks like the same bug as before, as it has the same error in the log (Android Logcat (Release)) and that one is fixed. Anything failing after that is hard to judge, as the run is already in a broken state.

    The second one (1315723) is getting processed, I can't personally make sure it's in 0.18, and I don't want to interrupt the process. Given we cut a release regularly, this one could miss 0.18 and end up in 0.19.

    I'll take a look at it and see if it should be flagged as a shipstopper though. Otherwise it just needs to go through our normal systems.
     
  34. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    Not sure what you mean. What support are you asking about specifically?
     
  35. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    From the logs of the report, it looks like you're building 32-bit Android. Is that right? We don't actively support 32-bit players with DOTS. The crash is most likely the result of loading DOTS binary that was built for 64-bit.

    Do you still get a crash with il2pp if you build for arm64?
     
  36. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,128
    Can u point me which line of log mention I'm building 32-bit Android? But it's still weird that Mono build works properly but il2cpp don't work properly. Or actually il2cpp also don't support 32-bit players?


    I believe it's WIP fully bursted system.
     
  37. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    Just to be clear, are you using Entity Scene files? If not, this may not be the issue. But I'll assume you are for now. In the log, it shows building a player for ARMv7 which is 32-bit.

    Mono on Android is always 32-bit. This can work out of luck, because the issue is the size of types, and when deserialising when pointers and references were serialised at 8bytes in size and deserialised at 4bytes, anything could go wrong. Or it can not go wrong at all, really depends on your exact data and where these values are in it.

    When you build with Build Configs you can add a component called "Android Architectures" and odds are it is defaulting to ARMv7 (32-bit) when you want ARM64.

    For our part, I think we need to explicitly prevent someone from having a broken default. So I'm going to chase that up.
     
    apkdev, Orimay and optimise like this.
  38. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Is there any plans to reduce GC from EntityManager.CreateArchetype (mainly removing params[])?
    E.g. something like a method overload that takes NativeArray<ComponentType>?

    Would be great for populating archetypes in runtime.
     
    JesOb likes this.
  39. linfuqing

    linfuqing

    Joined:
    May 11, 2015
    Posts:
    166
    Such as use IJobParallelFor or other job type in a ISystemBase,will it can be?
     
    Last edited: Feb 23, 2021
  40. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,128
    Have u see Android Logcat log file that has no Release? It has different crash error that I believe it's dots physics package bug.

    Do u mean subscene? If it's subscene then yes.

    Can you also tell them to add create symbol.zip option into Android platform Build Configs too into next platform android package version?

    Yes. It's still crash. Seems like it's the same crash with arm64 build.
     

    Attached Files:

    Last edited: Feb 24, 2021
    ScriptsEngineer likes this.
  41. UsmanMemon

    UsmanMemon

    Joined:
    Jan 24, 2020
    Posts:
    87
    This might not age well.
     
  42. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    In the editor everything works fine
    But I can't build DOTS + VR... The build always fails with:

    InvalidOperationException: BuildAssetBundles failed with status 'Error'.
    Unity.Scenes.Editor.SubSceneBuildCode.PrepareAdditionalFiles (UnityEditor.GUID[] sceneGuids, UnityEditor.Experimental.ArtifactKey[] entitySceneArtifacts, UnityEditor.BuildTarget target, System.Action`2[T1,T2] RegisterFileCopy, System.String outputStreamingAssetsDirectory, System.String buildWorkingDirectory) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/SubSceneBuildCode.cs:182)
    Unity.Scenes.Editor.EntitySectionBundlesBuildCustomizer.RegisterAdditionalFilesToDeploy (System.Action`2[T1,T2] registerAdditionalFileToDeploy) (at Library/PackageCache/com.unity.entities@0.17.0-preview.41/Unity.Scenes.Editor/EntitySectionBundlesBuildCustomizer.cs:47)
    Unity.Build.Classic.Private.CopyAdditionallyProvidedFilesStep.Run (Unity.Build.BuildContext context) (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build.Classic.Private/NonIncremental/Steps/CopyAdditionallyProvidedFilesStep.cs:16)
    Unity.Build.BuildStepCollection.Run (Unity.Build.BuildContext context) (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build/BuildStepCollection.cs:77)
    UnityEngine.Debug:LogException(Exception, Object)
    Unity.Build.ResultBase:LogResult() (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build/ResultBase.cs:69)
    Unity.Build.Editor.<>c:<.cctor>b__34_0(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:42)
    Unity.Build.Editor.<>c__DisplayClass30_0:<Build>b__1() (at Library/PackageCache/com.unity.platforms@0.10.0-preview.10/Editor/Unity.Build.Editor/BuildConfigurationInspector.cs:128)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  43. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,128
    Hi @Brian_Will, @topher_r. Can make sure il2cpp build won't open game straight crash anymore in next Entities 0.18?

    I believe this is related to subscene bug.
    (Case 1311658) [Netcode][IL2CPP] Player build crash or not working properly
    https://issuetracker.unity3d.com/is...on-null-pointer-dereference-when-launching-it
    https://issuetracker.unity3d.com/is...ilds-crash-with-entities-and-netcode-packages

    I believe this is related to dots physics bug.
    (Case 1315723) [IL2CPP][Physics][Netcode][Entities] Android build crash
    https://issuetracker.unity3d.com/is...-crashes-on-signal-11-sigsegv-upon-app-launch


    And also CompanionGameObjectUpdateTransformSystem and CompanionGameObjectUpdateSystem generating gc every frame. Can you make sure it will also getting fixed?

    upload_2021-4-4_2-34-49.png
     
  44. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Hi,

    Do Unity have some ETA for Entities 0.18?
    May be at lest in seasons Spring or Summer or Autumn?
     
  45. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
  46. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    111
    The only way I could build DOTS+VR was through the build configuration + (in my case Oculus) The Oculus application had to be installed and running.. I cannot say if the oculus (in my case Rift S) MUST be connected during the build, but I had it connected.
     
  47. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    Any ETA for 0.18? :):p
     
    Orimay, NotaNaN, phobos2077 and 4 others like this.
  48. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,258
    I would ask about 0.19 or 0.20. I'm 99% certain that 0.18 will be skipped.
     
  49. PhilSA

    PhilSA

    Joined:
    Jul 11, 2013
    Posts:
    1,926
  50. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,258
    I'm pretty sure they keep several of the DOTS packages in a mono-repo, and that may be referring to a mono-repo version number that we don't see. Otherwise we would see that 0.5 in the Issue Tracker, but instead we see 0.20 for Entities.
     
    andreiagmu and Harry-Wells like this.