Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

DOTS Sample

Discussion in 'Data Oriented Technology Stack' started by benjaminhwh, Dec 18, 2019.

  1. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,127
    It is turned off by default. We should probably look at changing the behaviour of it though, so it begins compilation earlier & parallel in order to reduce the time to enter playmode.
     
    awesomedata and Antypodish like this.
  2. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    It seems Debugging and maybe Burst 'checks' don't save well.. As I know the ONLY thing I do, is go in and un-check them a trillion times a day.
     
  3. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    181
    Any way to create terrain shader which is support the hybrid renderer? my terrains not showing at all,
     
  4. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    If you do a search for "Terrain" in your packages, you will find a HDTerrain material that you can apply to the Terrain and it will render as normal :)

    Cheers
    -Micah
     

    Attached Files:

  5. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    181
    I using the HDterrain shader and the terrain is not rendering well both in editor and build, this is why i'm asked if there is a way to create a terrain shader which has an option to support hybrid render as the other shaders, i'm didn't find a way to create terrain shader graph.

    i'm added the terrain to a subscene and its only shows if i'm edit the scene under the sub scene script, after i'm closing the scene, only trees and grasses are showing and terrain is gone.
     
  6. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    render_Summary.PNG
    I have my terrain in the main scene, as a sub-scene converts everything to entities.

    So in the attached picture, I have my:
    1. Terrain made by MapMagic in the Main Scene (whitebox_newmeshtest).
    so its not converted to any entity in a sub scene.
    2. Veg Studio, which manages Trees and Fulstrum Culling as entities in my main scene as well, so its not converted to any entity in a sub scene.
    3. The Terrain doesnt collide with the player right now naturally, so I exported the terrain to a mesh, and added that mesh to a sub-scene (020_environment), so that its converted at run time and works for collisions.
    4. Trees, Map Magic generates the placement of the trees and I also used it to generate colliders for the trees, by placing the gameobjects id later converted via a subscene. I then took the tree collider-objects (not renders) off the terrain, and dragged them into the sub-scene environment.

    Now I can see the terrain, use the terrain textures per normal, and shoot/run on top of it.
    I can also see trees, and collide/shoot at them.

    All running at better than 60fps, in editor and in build, at 4k. With 2 clients connected.

    Ill be posting a video summary of this, and ill put the link here as well.
    <Below is my dev Log 3, I tried to cover this>
     
    Last edited: Jan 4, 2020
  7. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    181

    Moving Terrain to the main scene did the trick thanks!
     
  8. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    181
    Any way to create similar build like the editor mode so in the build its starting a server +client?
     
  9. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    The "Play" Button does start a Server and Client, within the editor. You can also access the "assets/Build" folder and build stand-alone Server and Client applications to do full stand alone testing. You can also access the "A2" or 'Multiplayer' menus to launch a mix of client or server running editors, and external stand alone apps, together. So you can see what happens on just the server, within the editor, as example.
     
  10. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    181
    Thats okay, i can do builds, server and client, but i would like to create a build which is similar create server and client at the same time and you can play as its in the editor when the multiplayer settings are Client&Server. its could be useful in 1v1 or for smaller matches, so one of the players are became the host.
     
  11. Michael-Thomas

    Michael-Thomas

    Joined:
    Jul 8, 2014
    Posts:
    20
    I have been trying to explore the DOTS sample by making some theoretically simple changes to the game to see what happens. One of the things I've tried to do is add an alternative weapon - as a first step towards this I copied Weapon_Terraformer to Weapon_Foo and switched Hero_Terraformer to give the hero the new weapon instead of the old one. I adjusted a few controls and such on Weapon_Foo just to make it clear whether I had successfully swapped the weapon. I also then regenerated all the appropriate ghost code.

    This has resulted in some weirdness, and while I've found a workaround, it feels hacky and is probably not the intent so I'm wondering whether there's a better approach someone can point me to.

    Specifically, even though the Hero_Terraformer specifies the hero should get a Weapon_Foo (and they do on the server), on the client the hero instead always gets the Weapon_Terraformer. As far as I can tell, this is because the two weapons are very similar to the point that the system is using the same Archetype. What this means is that when FindSerializer() gets called on the GhostSerializerCollection, both types of weapon would return true on the CanSerialize() check and therefore the first one in the list will be used for both types of weapons, which happens to be Weapon_Terraformer in my case. Looking at the docs for NetCode and Ghosts this seems to be known and/or somewhat intentional. But since I've got two different prefabs and no way to choose between them, information seems to be being lost in this transfer. In my case the thing I noticed was that the activation buttons were always using the Weapon_Terraformer's activation buttons but this would seem likely to be the case for other things, such as if I'd tied the new weapon to a different-looking Part, I'd expect to get the wrong one.

    My workaround here is to add a special marker component to each type of weapon so that they're different and thus end up having separate EntityArchetypes, but this is a bunch of annoying extra empty marker classes and feels hacky, so I'm thinking is not the preferred approach here.

    Am I thinking about this totally wrong? Is there only meant to be one Weapon prefab/archetype and any differences between those weapons need to be sent across the wire to the client? That would seem to be sending unnecessary network traffic about something the client could just know about, but maybe that's not as big a deal as I'm thinking since it's only at creation time? (Although I also think if that's the case then the way the sample has ability activation buttons setup is not properly transmitting since those didn't seem to get reflected on the client.)

    As a slight aside - if you want a somewhat simpler version of this, you can get a similar effect with the NetCube project by duplicating the Cube as Sphere, swapping out its render mesh, and regenerating all the ghost code. If you put the sphere first in the GhostCollection, you will then see that even though the server is still spawning you as a cube, on the client, you are a sphere because that was first in the GhostCollection's list and the change to the render mesh did not affect the Archetype.
     
    Kender likes this.
  12. mhernandez88

    mhernandez88

    Joined:
    Jul 20, 2016
    Posts:
    31

    The answer to your question is both Yes and No. The DOTS Sample is clearly just a sample and as such limited in its functionality. It was built for a specific use case, and that use case was to get a single weapon working. So what you are doing is correct in the current context and also probably recommended, though there are other ways to achieve it.
    A weapon can be an EntityArchetype, the deserialized version of that Archetype can be an instance of a weapon.
    How that weapon looks can be a value on that weapon.

    So I guess what I am saying is you can either think of:
    1. Every weapon type is its own Archetype
    2. A weapon ( firearm ) is an Archetype, and its mutable characteristics are values on that archetypes components such that when you deserialize you can find the correct prefab to spawn or mutate.

    There may be other ways to view the relationship but thats how I see it from examining the code and my rudimentary knowledge of ECS
     
    Kender likes this.
  13. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    521
    I just downloaded the project, selected the Whitebox_Arena_A/Whitebox_Arena_A.unity scene and hit play
    The FPS is abysmal, the profiler states that a PlayerLoop takes 125ms, 41.47ms of those are wasted on WaitForJobGroupID. What kinds of files I need to supply to troubleshoot this?
     
  14. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    148
    Joachim gave a pretty good explanation on editor performance:

     
    AggressiveMastery likes this.
  15. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    521
    After disabling everything above, it still would only run at 55~ fps, where only 2.4 ms were from the render thread according to the stat window. Considering how much DOTS is supposed to speed things up, I still think there is something wrong with my configurations, but I guess I will just wait for more improvements before I start developing with the netcode thingy
     
  16. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    The underlying sample runs well, even with the server code set to single core as earlier pointed out. I was seeing 60fps+ at 4k, with veg studio and tons of vegetation running on top of the sample. Best performance will not be seen in the editor.

    Be sure to turn off burst compile, and wait for all the compiles to be done in play mode. But still, within the editor, you will be hard pressed to see about 60 fps. Also, what are you judging fps against? I took time.deltatime of the last 2 frames, divide by 2, and then took that and saw how many I can fit into 1 second. that is the fps displayed on this video of the modded dots sample:

    But this is just self testing, were you load testing with multiple clients?


    PC is a Intel i7 8700k @ 4.5Ghz (6 core)
    32 GB 4133Mhz DDR4
    Raid0 M2 Drives (3.5GB read, 1.5GB write)
    Zotec AMp Extream 1080TI 11GB
    4k@60hz, 3440x1440@120hz, 1080@60hz
    Asrock Z370 E4 Mobo
     
    Last edited: Jan 14, 2020
    FlavioIT and keeponshading like this.
  17. desertGhost_

    desertGhost_

    Joined:
    Apr 12, 2018
    Posts:
    148
    Right now the DOTS Sample is configured to run everything in a single threaded manner (both server and client are running on one thread) -- the client and server compute times are stacked in the editor. If you compile a server executable and a client executable each will run in their own thread and you will see much better performance.

     
    Guedez and AggressiveMastery like this.
  18. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    521
    If you mean 'how did you measure fps?', the play mode stat window.

    Glad to know that most if not all performance issues are Editor time only, it means I can start messing with it
     
  19. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    583
    Last edited: Jan 19, 2020
    AggressiveMastery likes this.
  20. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Howdy Keeponshading!!

    This sample is made with DOTS Physics, so we will need to call against physics in DOTS. Which I haven't done, but it will be a distance cast vs entity transforms. Just done with a scheduler every frame.

    So you could pull in the old car scrips, but they are mono-develop (single threaded), and not DOTS(multi-threaded : OVER SIMPLIFICATION GUYS.) So you are then placing the car scripts, as mono scrips, as huge road blocks to each frame. Basically destroying the beauty of DOTS. Unless you have put the DOTS Multiplayer Sample aspect as all you are using in this sample :)

    It will be best, and what I will be doing, but not for a few months... is making a DOTS car controller, as that will be vital to multiplayer. It may be as simple as restricting player movements, so they act as a car. But I want a moving body, you can walk around on with other players. Like the friggin DOTS sample of the FPS sample, never released. /pff

    So it wont be, in any way, as easy as it was in the FPS sample. Unless you abandon DOTS, then ... maybe. Just attach the move script to your car, and find a way to trigger it with dots. And dual your colliders, meaning have one for the old car script physics, and dots, basically bastardizing the physics between dots and old units.

    Just talking theory, and I look forward to showing it in action, some future video :)
    Micah
     
    keeponshading likes this.
  21. mhernandez88

    mhernandez88

    Joined:
    Jul 20, 2016
    Posts:
    31
    I think it would be fairly easy honestly. The most complex aspect of this sample seems to be the new animation and any code that fills in the gaps of missing features. Ill look into the code again shortly and see if i can point out some areas where the raycast car sample would be ported and merged.
     
  22. mhernandez88

    mhernandez88

    Joined:
    Jul 20, 2016
    Posts:
    31
    One thing that irks me about the DOTS Sample is that there seems to be the inability to calculate offsets easily. For instance I am unsure how the creators efficiently determined IK offsets.
     
  23. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Hey! I was able to get Visual Scripting for DOTS working with the sample. By changing the error about time to reference UnityEngine.Time, and by moving the Visual Script Package folder out of the cache folder and into the package folder so that the modification does not get over-written each reload of the editor. Its great to see class/struct from the overall sample there. ... https://forum.unity.com/threads/dot...-experimental-drop.795807/page-2#post-5408067
     
    keeponshading likes this.
  24. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    181
    Hello!

    Anyone figoured out which script are starting the multiplayer?
    Somehow i would like to find out the how the systems are starting, so far which is clear thats the game.cs but seem "Network client" are intitializing automatically, for now(for testing) i would like to completly turn off the multiplayer part but seems i can't find how this all are starting, any ideas?(there is no documentation at all also seems already dead project again?)

    Thanks!
     
    Opeth001 and AggressiveMastery like this.
  25. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Bootstrapper, check out the "build folder" and you can see in the diffrent build scripts what the default scenes loaded are.

    Within the boot strapper you will find the game kickoff scripts.

    Since this is DOTS , and a DOTS Sample Project, a lot of the 'work' is done via jobs and systems. So you need to understand how DOTS executes per frame, to get a full understand whats being done.
     

    Attached Files:

  26. sybere

    sybere

    Joined:
    Mar 26, 2015
    Posts:
    181
    Bootstarper scene are only contains a prefab with the Game.cs and than a lot of thing happening(automatically in the backdround especially in the editor.)..
     
  27. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Correct, DOTS has Systems running automatically, which then take action on any data that needs to be modified. So all the DOTS Systems, I believe, start running by default. So looking for those systems, could que you into them. By restricting what entities come up in your queries by those systems, you reduce you workloads (the systems always run, but without any work to do, are very low overhead.) So its not all happening in one game.cs, its happening through all the systems as well. Aka the need to understand DOTS.

    So Game.cs runs every frame, and some other mono scripts are also running every frame.
    Additionally, you have several DOTS systems running as well, looking each frame for work, and doing it (I believe all in a single core .run now from above posts).

    The 'Engine' then, is a few Game.cs type things, but mostly DOTS systems looking for work each frame. Which is nice, as it frees you up to write your own DOTS or mono scripts for the other cores on the system, or switch this to .schedule? and co-mingle the jobs.
     
    eatbuckshot likes this.
  28. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    The Editor is also running a Client and Server version of the code, so you have options to view scrips/jobs/entities for all those worlds. aka ya lot is happening in the editor, you need to filter it down to see specifics.
     
  29. alsharefeeee

    alsharefeeee

    Joined:
    Jul 6, 2013
    Posts:
    55
    Hello, I have tried to open DOTS Sample with Unity 2019.3.0f6 but Unity freeze when loading package manager "Resolving Packages.."
     
  30. Graep

    Graep

    Joined:
    May 29, 2013
    Posts:
    7
    I fixed this by change the version of the animator package to this "com.unity.animation": "0.3.0-preview.7" and then back
     
    Last edited: Feb 14, 2020
    AggressiveMastery likes this.
  31. alsharefeeee

    alsharefeeee

    Joined:
    Jul 6, 2013
    Posts:
    55
    Tested it, didn't work for me.
     
  32. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    I'd recommend making a fresh install of the DOTS sample, then re-opening it.

    It doesn't freeze up like that for me.

    You may also try to reset the package manager, but then you would need to manually selected the required packages which may be a pain...

    Additionally, I am running Windows 10 64bit, fyi.

    Good Luck
    Micah
     
  33. alsharefeeee

    alsharefeeee

    Joined:
    Jul 6, 2013
    Posts:
    55
    Thanks, I don't think it's related to the DOTS Sample project because I can't even install the entity package in an empty project, I think it's either related to my widows username having a space in the middle or some Visual Studio packages.
     
    AggressiveMastery likes this.
  34. eatbuckshot

    eatbuckshot

    Joined:
    Jan 10, 2016
    Posts:
    19
    I've been trying to target Android with the DOTS Sample project and I can get as far as replacing all HDRP based shaders with URP ones. However when building for android i believe subscenes and weakassetreferences/prefab registry assets seem to be missing from the apk, since only the 2d UI overlay renders over a black screen. In the logs, there is an error when AnimSourceController tries to CreateEntity, which thinks the guid is all 0's.

    I noticed that the version 0.4.0 of the entities package contains build pipeline code which was later separated out into the platforms packages in 0.6.0 . It isn't until version 0.2.0 of the android platform package where it contains a hybrid build pipeline that includes the step to include the assets for android.

    While i want to use 0.6.0, it also makes some breaking API changes such as World.Active being removed or returning a readonly list, both of which causes issues with the current version of the unity net package (0.2.0 - 0.4.0).

    When might we expect an update on the dots sample project and those packages?

    Edit:
    It seems for the time being Entities version 0.5.0 added in android hybrid build support and doesn't make api changes that break net 0.2.0 (also doesn't require the new individual build platform packages)
    Though the same error still pops up
    Code (CSharp):
    1.  
    2. 02-22 13:16:37.878: E/Unity(12237): Failed to create prefab for asset:00000000000000000000000000000000
    3. 02-22 13:16:37.878: E/Unity(12237): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    4. 02-22 13:16:37.878: E/Unity(12237): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    5. 02-22 13:16:37.878: E/Unity(12237): UnityEngine.Logger:Log(LogType, Object)
    6. 02-22 13:16:37.878: E/Unity(12237): UnityEngine.Debug:LogError(Object)
    7. 02-22 13:16:37.878: E/Unity(12237): Unity.Sample.Core.GameDebug:LogError(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:360)
    8. 02-22 13:16:37.878: E/Unity(12237): PrefabAssetManager:CreateEntity(EntityManager, WeakAssetReference) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\PrefabAssetRegistry\PrefabAssetManager.cs:25)
    9. 02-22 13:16:37.878: E/Unity(12237): <>c__DisplayClass_OnUpdate_LambdaJob0:OriginalLambdaBody(Entity) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Game\AnimSource\AnimSourceController.cs:178)
    10. 02-22 13:16:37.878: E/Unity(12237): <>c__DisplayClass_OnUpdate_LambdaJob0:PerformLambda(Void*, Void*, Entity)
    11. 02-22 13:16:37.878: E/Unity(12237): Unity.Entities.CodeGeneratedJobForEach.StructuralChangeEntityProvider:IterateEntities(Void*, Void*, PerformLambdaDelegate) (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entit
    12. 02-22 13:16:37.956: E/Unity(12237): NullReferenceException: Object reference not set to an instance of an object
    13. 02-22 13:16:37.956: E/Unity(12237):   at Unity.Entities.ChunkIterationUtility.GetChunkComponentDataPtr (Unity.Entities.Chunk* chunk, System.Boolean isWriting, System.Int32 indexInArchetype, System.UInt32 systemVersion) [0x00001] in D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\Iterators\ChunkIterationUtility.cs:371
    14. 02-22 13:16:37.956: E/Unity(12237):   at Unity.Entities.ArchetypeChunkIterator.GetCurrentChunkComponentDataPtr (System.Boolean isWriting, System.Int32 indexInEntityQuery) [0x00018] in D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\Iterators\ArchetypeChunkIterator.cs:195
    15. 02-22 13:16:37.956: E/Unity(12237):   at Unity.Entities.EntityQuery.GetSingleton[T] () [0x00017] in D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\Iterators\EntityQuery.cs:839
    16. 02-22 13:16:37.956: E/Unity(12237):   at AnimSourceJump+UpdateSystem.OnUpdate (Unity.Jobs.JobHandle inputDeps) [0x00016] in D:\dev2020\DOTSSample\Assets\Unity.Sample.Ter
    17.  
    18.  
    Code (CSharp):
    1. 02-22 14:34:23.265: I/Unity(15677): 2: Trying to connect to 192.168.1.66 (attempt #1)...
    2. 02-22 14:34:23.265: I/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    3. 02-22 14:34:23.265: I/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    4. 02-22 14:34:23.265: I/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    5. 02-22 14:34:23.265: I/Unity(15677): UnityEngine.Debug:Log(Object)
    6. 02-22 14:34:23.265: I/Unity(15677): Unity.Sample.Core.GameDebug:Log(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:110)
    7. 02-22 14:34:23.265: I/Unity(15677): ClientGameLoopSystem:UpdateConnectingState() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\ClientGameLoop.cs:553)
    8. 02-22 14:34:23.265: I/Unity(15677): StateMachine`1:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:26)
    9. 02-22 14:34:23.265: I/Unity(15677): ClientGameLoopSystem:OnUpdate() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\ClientGameLoop.cs:486)
    10. 02-22 14:34:23.265: I/Unity(15677): Unity.Entities.ComponentSystem:Update() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystem.cs:107)
    11. 02-22 14:34:23.265: I/Unity(15677): Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-
    12. 02-22 14:34:23.827: I/Unity(15677): 4: <color=#8FAB2B><ClientWorld0></color>Switching state: Connecting -> Loading
    13. 02-22 14:34:23.827: I/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    14. 02-22 14:34:23.827: I/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    15. 02-22 14:34:23.827: I/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    16. 02-22 14:34:23.827: I/Unity(15677): UnityEngine.Debug:Log(Object)
    17. 02-22 14:34:23.827: I/Unity(15677): Unity.Sample.Core.GameDebug:InternalLog(WorldId, ConfigVar, String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:269)
    18. 02-22 14:34:23.827: I/Unity(15677): Unity.Sample.Core.GameDebug:Log(WorldId, ConfigVar, String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:282)
    19. 02-22 14:34:23.827: I/Unity(15677): StateMachine`1:SwitchTo(World, ClientState) (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:42)
    20. 02-22 14:34:23.827: I/Unity(15677): ClientGameLoopSystem:UpdateConnectingState() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\ClientGameLoop.cs:590)
    21. 02-22 14:34:23.827: I/Unity(15677): StateMachine`1:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:26)
    22. 02-22 14:34:23.827: I/Unity(15677): ClientGameLoopSystem:OnUpdate() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\
    23. 02-22 14:34:23.878: D/ViewRootImpl@640796[UnityPlayerActivity](15677): dispatchDetachedFromWindow
    24. 02-22 14:34:23.903: D/ViewRootImpl@bb79de4[UnityPlayerActivity](15677): MSG_WINDOW_FOCUS_CHANGED 1
    25. 02-22 14:34:23.908: I/Unity(15677): windowFocusChanged: true
    26. 02-22 14:34:23.983: D/ViewRootImpl@bb79de4[UnityPlayerActivity](15677): MSG_RESIZED: frame=Rect(0, 0 - 2560, 1440) ci=Rect(0, 0 - 0, 0) vi=Rect(0, 0 - 0, 0) or=2
    27. 02-22 14:34:24.020: D/Unity(15677): Unloading 59 Unused Serialized files (Serialized files now loaded: 0)
    28. 02-22 14:34:24.086: D/Unity(15677): UnloadTime: 1.344011 ms
    29. 02-22 14:34:24.181: I/Unity(15677): 8: Stripping code for Client (DevBuild)
    30. 02-22 14:34:24.181: I/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    31. 02-22 14:34:24.181: I/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    32. 02-22 14:34:24.181: I/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    33. 02-22 14:34:24.181: I/Unity(15677): UnityEngine.Debug:Log(Object)
    34. 02-22 14:34:24.181: I/Unity(15677): Unity.Sample.Core.GameDebug:Log(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:110)
    35. 02-22 14:34:24.181: I/Unity(15677): LevelManager:StripCode(BuildType, Boolean) (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Core\LevelManager.cs:160)
    36. 02-22 14:34:24.181: I/Unity(15677): LevelManager:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Core\LevelManager.cs:138)
    37. 02-22 14:34:24.181: I/Unity(15677): Game:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\Game.cs:569)
    38. 02-22 14:34:24.181: I/Unity(15677):
    39. 02-22 14:34:24.181: I/Unity(15677): (Filename: D Line: 0)
    40. 02-22 14:34:24.194: I/Unity(15677): 8: Stripping 0 game object(s) and 0 behavior(s)
    41. 02-22 14:34:24.194: I/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    42. 02-22 14:34:24.194: I/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    43. 02-22 14:34:24.194: I/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    44. 02-22 14:34:24.194: I/Unity(15677): UnityEngine.Debug:Log(Object)
    45. 02-22 14:34:24.194: I/Unity(15677): Unity.Sample.Core.GameDebug:Log(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:110)
    46. 02-22 14:34:24.194: I/Unity(15677): LevelManager:StripCode(BuildType, Boolean) (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Core\LevelManager.cs:178)
    47. 02-22 14:34:24.194: I/Unity(15677): LevelManager:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Core\LevelManager.cs:138)
    48. 02-22 14:34:24.194: I/Unity(15677): Game:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\Game.cs:569)
    49. 02-22 14:34:24.194: I/Unity(15677):
    50. 02-22 14:34:24.194: I/Unity(15677): (Filename: D Line: 0)
    51. 02-22 14:34:24.196: I/Unity(15677): 8: Scene whitebox_basic_a loaded
    52. 02-22 14:34:24.196: I/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    53. 02-22 14:34:24.196: I/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    54. 02-22 14:34:24.196: I/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    55. 02-22 14:34:24.196: I/Unity(15677): UnityEngine.Debug:Log(Object)
    56. 02-22 14:34:24.196: I/Unity(15677): Unity.Sample.Core.GameDebug:Log(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:110)
    57. 02-22 14:34:24.196: I/Unity(15677): LevelManager:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Core\LevelManager.cs:145)
    58. 02-22 14:34:24.196: I/Unity(15677): Game:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\Game.cs:569)
    59. 02-22 14:34:24.196: I/Unity(15677):
    60. 02-22 14:34:24.196: I/Unity(15677): (Filename: D Line: 0)
    61. 02-22 14:34:24.237: I/Unity(15677): 8: <color=#8FAB2B><ClientWorld0></color>Switching state: Loading -> WaitSubscene
    62. 02-22 14:34:24.237: I/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    63. 02-22 14:34:24.237: I/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    64. 02-22 14:34:24.237: I/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    65. 02-22 14:34:24.237: I/Unity(15677): UnityEngine.Debug:Log(Object)
    66. 02-22 14:34:24.237: I/Unity(15677): Unity.Sample.Core.GameDebug:InternalLog(WorldId, ConfigVar, String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:269)
    67. 02-22 14:34:24.237: I/Unity(15677): Unity.Sample.Core.GameDebug:Log(WorldId, ConfigVar, String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:282)
    68. 02-22 14:34:24.237: I/Unity(15677): StateMachine`1:SwitchTo(World, ClientState) (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:42)
    69. 02-22 14:34:24.237: I/Unity(15677): ClientGameLoopSystem:UpdateLoadingState() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\ClientGameLoop.cs:641)
    70. 02-22 14:34:24.237: I/Unity(15677): StateMachine`1:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:26)
    71. 02-22 14:34:24.237: I/Unity(15677): ClientGameLoopSystem:OnUpdate() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\C
    72. 02-22 14:34:24.392: D/Unity(15677): System memory in use before: 68.0 MB.
    73. 02-22 14:34:24.457: D/Unity(15677): System memory in use after: 68.2 MB.
    74. 02-22 14:34:24.458: D/Unity(15677): Unloading 912 unused Assets to reduce memory usage. Loaded Objects now: 3456.
    75. 02-22 14:34:24.458: D/Unity(15677): Total: 65.176407 ms (FindLiveObjects: 3.410990 ms CreateObjectMapping: 0.677083 ms MarkObjects: 60.214948 ms  DeleteObjects: 0.855104 ms)
    76. 02-22 14:34:26.023: W/Unity(15677): Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    77. 02-22 14:34:26.023: W/Unity(15677): (Filename: ./Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 554)
    78. 02-22 14:34:26.225: W/Unity(15677): Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    79. 02-22 14:34:26.225: W/Unity(15677): (Filename: ./Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 554)
    80. 02-22 14:34:26.393: W/Unity(15677): Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 11)
    81. 02-22 14:34:26.393: W/Unity(15677): (Filename: ./Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 310)
    82. 02-22 14:34:26.393: W/Unity(15677): Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 11)
    83. 02-22 14:34:26.393: W/Unity(15677): (Filename: ./Runtime/Allocator/ThreadsafeLinearAllocator.cpp Line: 310)
    84. 02-22 14:34:26.439: D/Unity(15677): Streamed scene with 2023ms latency from jar:file:///data/app/com.test.DotsSampleTP-rGDeWe3EnaN3IuPxjMOZzA==/base.apk!/assets/SubScenes/015bc7505bb5146b6bafb3445e245d23.0.entities
    85. 02-22 14:34:27.074: D/Unity(15677): Streamed scene with 2683ms latency from jar:file:///data/app/com.test.DotsSampleTP-rGDeWe3EnaN3IuPxjMOZzA==/base.apk!/assets/SubScenes/0b057349a17388640881793750a3afc2.0.entities
    86. 02-22 14:34:27.201: I/Unity(15677): 38: <color=#8FAB2B><ClientWorld0></color>Switching state: WaitSubscene -> Playing
    87. 02-22 14:34:27.201: I/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    88. 02-22 14:34:27.201: I/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    89. 02-22 14:34:27.201: I/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    90. 02-22 14:34:27.201: I/Unity(15677): UnityEngine.Debug:Log(Object)
    91. 02-22 14:34:27.201: I/Unity(15677): Unity.Sample.Core.GameDebug:InternalLog(WorldId, ConfigVar, String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:269)
    92. 02-22 14:34:27.201: I/Unity(15677): Unity.Sample.Core.GameDebug:Log(WorldId, ConfigVar, String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:282)
    93. 02-22 14:34:27.201: I/Unity(15677): StateMachine`1:SwitchTo(World, ClientState) (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:42)
    94. 02-22 14:34:27.201: I/Unity(15677): ClientGameLoopSystem:UpdateWaitSubsceneState() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\ClientGameLoop.cs:651)
    95. 02-22 14:34:27.201: I/Unity(15677): StateMachine`1:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:26)
    96. 02-22 14:34:27.201: I/Unity(15677): ClientGameLoopSystem:OnUpdate() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\
    97. 02-22 14:34:28.724: I/Unity(15677): Assign command on client
    98. 02-22 14:34:28.724: I/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    99. 02-22 14:34:28.724: I/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    100. 02-22 14:34:28.724: I/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    101. 02-22 14:34:28.724: I/Unity(15677): UnityEngine.Debug:Log(Object)
    102. 02-22 14:34:28.724: I/Unity(15677): PlayerModuleClient:RegisterLocalPlayer(Int32) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Game\Player\PlayerModuleClient.cs:86)
    103. 02-22 14:34:28.724: I/Unity(15677): ClientGameWorld:RegisterLocalPlayer(Int32) (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\ClientGameLoop.cs:254)
    104. 02-22 14:34:28.724: I/Unity(15677): ClientGameLoopSystem:EnterPlayingState() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\ClientGameLoop.cs:667)
    105. 02-22 14:34:28.724: I/Unity(15677): StateMachine`1:SwitchTo(World, ClientState) (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:47)
    106. 02-22 14:34:28.724: I/Unity(15677): ClientGameLoopSystem:UpdateWaitSubsceneState() (at D:\dev2020\DOTSSample\Assets\Scripts\Game\Main\ClientGameLoop.cs:651)
    107. 02-22 14:34:28.724: I/Unity(15677): StateMachine`1:Update() (at D:\dev2020\DOTSSample\Assets\Scripts\Utils\StateMachine.cs:26)
    108. 02-22 14:34:28.724: I/Unity(15677): ClientGameLoopSystem:OnUpdate() (at D:\dev2020\DOTSSample\Assets\Scripts
    109. 02-22 14:34:28.810: D/Unity(15677): Streamed scene with 4419ms latency from jar:file:///data/app/com.test.DotsSampleTP-rGDeWe3EnaN3IuPxjMOZzA==/base.apk!/assets/SubScenes/8863f650be6334278955d405135dfcd6.0.entities
    110. 02-22 14:34:29.320: W/Unity(15677): PartOwner update: No camera.main
    111. 02-22 14:34:29.320: W/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    112. 02-22 14:34:29.320: W/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    113. 02-22 14:34:29.320: W/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    114. 02-22 14:34:29.320: W/Unity(15677): UnityEngine.Debug:LogWarning(Object)
    115. 02-22 14:34:29.320: W/Unity(15677): Unity.Sample.Core.GameDebug:LogWarning(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:380)
    116. 02-22 14:34:29.320: W/Unity(15677): Update:OnUpdate() (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Game\Part\PartOwner.cs:126)
    117. 02-22 14:34:29.320: W/Unity(15677): Unity.Entities.ComponentSystem:Update() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystem.cs:107)
    118. 02-22 14:34:29.320: W/Unity(15677): Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystemGroup.cs:182)
    119. 02-22 14:34:29.320: W/Unity(15677): Unity.Entities.ComponentSystemGroup:OnUpdate() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystemGroup.cs:169)
    120. 02-22 14:34:29.320: W/Unity(15677): Unit
    121. 02-22 14:34:30.186: W/Unity(15677): PartOwner update: No camera.main
    122. 02-22 14:34:30.186: W/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    123. 02-22 14:34:30.186: W/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    124. 02-22 14:34:30.186: W/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    125. 02-22 14:34:30.186: W/Unity(15677): UnityEngine.Debug:LogWarning(Object)
    126. 02-22 14:34:30.186: W/Unity(15677): Unity.Sample.Core.GameDebug:LogWarning(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:380)
    127. 02-22 14:34:30.186: W/Unity(15677): Update:OnUpdate() (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Game\Part\PartOwner.cs:126)
    128. 02-22 14:34:30.186: W/Unity(15677): Unity.Entities.ComponentSystem:Update() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystem.cs:107)
    129. 02-22 14:34:30.186: W/Unity(15677): Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystemGroup.cs:182)
    130. 02-22 14:34:30.186: W/Unity(15677): Unity.Entities.ComponentSystemGroup:OnUpdate() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystemGroup.cs:169)
    131. 02-22 14:34:30.186: W/Unity(15677): Unit
    132. 02-22 14:34:30.444: W/Unity(15677): PartOwner update: No camera.main
    133. 02-22 14:34:30.444: W/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    134. 02-22 14:34:30.444: W/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    135. 02-22 14:34:30.444: W/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    136. 02-22 14:34:30.444: W/Unity(15677): UnityEngine.Debug:LogWarning(Object)
    137. 02-22 14:34:30.444: W/Unity(15677): Unity.Sample.Core.GameDebug:LogWarning(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:380)
    138. 02-22 14:34:30.444: W/Unity(15677): Update:OnUpdate() (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Game\Part\PartOwner.cs:126)
    139. 02-22 14:34:30.444: W/Unity(15677): Unity.Entities.ComponentSystem:Update() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystem.cs:107)
    140. 02-22 14:34:30.444: W/Unity(15677): Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystemGroup.cs:182)
    141. 02-22 14:34:30.444: W/Unity(15677): Unity.Entities.ComponentSystemGroup:OnUpdate() (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entities@0.5.0-preview.17\Unity.Entities\ComponentSystemGroup.cs:169)
    142. 02-22 14:34:30.444: W/Unity(15677): Unit
    143. 02-22 14:34:46.685: E/Unity(15677): Failed to create prefab for asset:00000000000000000000000000000000
    144. 02-22 14:34:46.685: E/Unity(15677): UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    145. 02-22 14:34:46.685: E/Unity(15677): UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    146. 02-22 14:34:46.685: E/Unity(15677): UnityEngine.Logger:Log(LogType, Object)
    147. 02-22 14:34:46.685: E/Unity(15677): UnityEngine.Debug:LogError(Object)
    148. 02-22 14:34:46.685: E/Unity(15677): Unity.Sample.Core.GameDebug:LogError(String) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\GameDebug\GameDebug.cs:360)
    149. 02-22 14:34:46.685: E/Unity(15677): PrefabAssetManager:CreateEntity(EntityManager, WeakAssetReference) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Core\Scripts\PrefabAssetRegistry\PrefabAssetManager.cs:25)
    150. 02-22 14:34:46.685: E/Unity(15677): <>c__DisplayClass_OnUpdate_LambdaJob0:OriginalLambdaBody(Entity) (at D:\dev2020\DOTSSample\Assets\Unity.Sample.Game\AnimSource\AnimSourceController.cs:178)
    151. 02-22 14:34:46.685: E/Unity(15677): <>c__DisplayClass_OnUpdate_LambdaJob0:PerformLambda(Void*, Void*, Entity)
    152. 02-22 14:34:46.685: E/Unity(15677): Unity.Entities.CodeGeneratedJobForEach.StructuralChangeEntityProvider:IterateEntities(Void*, Void*, PerformLambdaDelegate) (at D:\dev2020\DOTSSample\Library\PackageCache\com.unity.entit
    153.  
    Edit 2:
    I am logging out the entity lookup as such:
    Code (CSharp):
    1. public static Entity FindEntityPrefab(EntityManager entityManager, WeakAssetReference assetGuid)
    2.     {
    3.         GameDebug.LogWarning("FindEntityPrefab: " + assetGuid.ToGuidStr());
    4.         var entity = GetRegistryEntity(entityManager);
    5.         if(entity == Entity.Null)
    6.             return Entity.Null;
    7.  
    8.  
    9.         var entries = entityManager.GetBuffer<PrefabAssetRegistry.Entry>(entity);
    10.         for (int i = 0; i < entries.Length;i++)
    11.         {
    12.             GameDebug.LogWarning("FindEntityPrefab --> iterating: " + entries[i].Reference.ToGuidStr());
    13.             if (entries[i].Reference.Equals(assetGuid))
    14.                 return entries[i].EntityPrefab;
    15.         }
    16.         GameDebug.LogWarning("FindEntityPrefab Not Found: " + assetGuid.ToGuidStr());
    17.  
    18.         return Entity.Null;
    19.     }
    Which now yields
    Code (CSharp):
    1.  
    2. : 1ca31dbb960fba74d835aa8845911ed8
    3.  --> iterating: 7568de2b7c6b67d48bd2c6c0161c2f71
    4.  --> iterating: 7252f25d127204c46833d5782d684f94
    5.  --> iterating: 7487763fdab730d44b6d03c0589993e4
    6.  --> iterating: 1ca31dbb960fba74d835aa8845911ed8
    7. : 00000000000000000000000000000000
    8.  --> iterating: 7568de2b7c6b67d48bd2c6c0161c2f71
    9.  --> iterating: 7252f25d127204c46833d5782d684f94
    10.  --> iterating: 7487763fdab730d44b6d03c0589993e4
    11.  --> iterating: 1ca31dbb960fba74d835aa8845911ed8
    12.  --> iterating: fc7244e5d63a2a04aa83dd6eebdfdf62
    13.  --> iterating: a2230e32529d5ca4ea5f550bcaf396ff
    14.  --> iterating: 8df330aa5f962b94590d6c4477944a8b
    15.  --> iterating: 88686be2ee1f2c340b43bb28e14d84cc
    16.  --> iterating: 8c67522f514be7c41aa8604f92b11746
    17.  --> iterating: faaee322a71b3794f9c626255cd9b60a
    18.  --> iterating: 4ba77e944184a9249a8f73f66bd71cbd
    19.  --> iterating: 1dc298bcb82cd9044a022d5f12df3c58
    20.  --> iterating: e343ead2fdf2caa41807ab6c2fda6c46
    21.  --> iterating: 03ba8c413377d414f839f9c9d0e531e3
    22.  --> iterating: 040d3b9261786c249a408fafe7f660b7
    23.  --> iterating: f5c874ecde92acb4aab6447db7df3cbb
    24.  --> iterating: b7464d9aea601814db7eac95167c4c71
    25.  --> iterating: aace95e8b4adf184bac1169bb6e1785c
    26.  --> iterating: ff9a31e680f83c245aa360bcb41998b4
    27.  Not Found: 00000000000000000000000000000000
    28. : 8c67522f514be7c41aa8604f92b11746
    29.  --> iterating: 7568de2b7c6b67d48bd2c6c0161c2f71
    30.  --> iterating: 7252f25d127204c46833d5782d684f94
    31.  --> iterating: 7487763fdab730d44b6d03c0589993e4
    32.  --> iterating: 1ca31dbb960fba74d835aa8845911ed8
    33.  --> iterating: fc7244e5d63a2a04aa83dd6eebdfdf62
    34.  --> iterating: a2230e32529d5ca4ea5f550bcaf396ff
    35.  --> iterating: 8df330aa5f962b94590d6c4477944a8b
    36.  --> iterating: 88686be2ee1f2c340b43bb28e14d84cc
    37.  --> iterating: 8c67522f514be7c41aa8604f92b11746
    38. : 88686be2ee1f2c340b43bb28e14d84cc
    39.  --> iterating: 7568de2b7c6b67d48bd2c6c0161c2f71
    40.  --> iterating: 7252f25d127204c46833d5782d684f94
    41.  --> iterating: 7487763fdab730d44b6d03c0589993e4
    42.  --> iterating: 1ca31dbb960fba74d835aa8845911ed8
    43.  --> iterating: fc7244e5d63a2a04aa83dd6eebdfdf62
    44.  --> iterating: a2230e32529d5ca4ea5f550bcaf396ff
    45.  --> iterating: 8df330aa5f962b94590d6c4477944a8b
    46.  --> iterating: 88686be2ee1f2c340b43bb28e14d84cc
    47.  
    So it seems somehow
    settings.RootAnimSource
    is losing the asset guid when built for android which is bizarre since i get
    0: Convert DotsAnimStateController:Char_Terraformer (AnimSourceControllerAuthoring) 8df330aa5f962b94590d6c4477944a

    when logging out the editor prefab conversion for the
    AnimSourceControllerAuthoring 
    script
    Code (CSharp):
    1.  
    2.  
    3.     public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
    4.     {
    5.         GameDebug.Log(string.Format("Convert DotsAnimStateController:{0} {1}", this, AnimSourceRoot.ToGuidStr()));
    6.  
    7.         var settings = AnimSourceController.Settings.Default;
    8.         settings.RootAnimSource = AnimSourceRoot;
    9.         dstManager.AddComponentData(entity, settings);
    10. ...
    Could the prefab losing the value and becoming null be related to this issue?
    https://issuetracker.unity3d.com/is...re-lost-when-modifying-prefab?page=1#comments
    As a really bad hack I've hardcoded the guid reference lookup:
    Code (CSharp):
    1.                 // Create root animsource
    2.                 var settings = EntityManager.GetComponentData<Settings>(entity);
    3.                 if (!settings.RootAnimSource.IsSet())
    4.                 {
    5.                     GameDebug.LogWarning("Could not retrieve default asset reference, RootAnimSource, hardcoding to 8df330aa5f962b94590d6c4477944a8b");
    6.                     settings.RootAnimSource = new WeakAssetReference("8df330aa5f962b94590d6c4477944a8b");
    7.                 }
    8.                 var rootAnimSourceEntity = PrefabAssetManager.CreateEntity(EntityManager, settings.RootAnimSource);
    At any rate it can barely run on Android now, if i turn off burst compilation. It seems it's erroring out on many null references pertaining to rigging. It only gets maybe around 15-20fps
     
    Last edited: Feb 23, 2020
    Kender and AggressiveMastery like this.
  35. CorneliusCornbread

    CorneliusCornbread

    Joined:
    Jun 21, 2017
    Posts:
    31
    I noticed that the project says you guys use the new DOTS based physics package. From what I can tell the game's framerate isn't tied to the speed of players (who I assume are rigidbody based), how did you solve the framerate related physics update issues that currently plague the physics package?

    Thanks in advance
     
  36. Jawsarn

    Jawsarn

    Joined:
    Jan 12, 2017
    Posts:
    149
    It's because they use the DOTS NetCode which runs (Server/Client)SimulationSystemGroup at a fixed rate. You can see the logic for this in the actual SystemGroup classes to only call OnUpdate for certain conditions.
     
    AggressiveMastery likes this.
  37. eatbuckshot

    eatbuckshot

    Joined:
    Jan 10, 2016
    Posts:
    19
    #84
    Code (CSharp):
    1.  
    2.     "com.unity.animation": "0.2.16-preview.5",
    3.     "com.unity.burst": "1.3.0-preview.3",
    4.     "com.unity.collections": "0.5.2-preview.8",
    5.     "com.unity.dots.editor": "0.3.0-preview",
    6.     "com.unity.entities": "0.6.0-preview.24",
    7.     "com.unity.jobs": "0.2.5-preview.20",
    8.     "com.unity.mathematics": "1.1.0",
    9.     "com.unity.netcode": "0.1.0-preview.6",
    10.     "com.unity.performance.profile-analyzer": "0.6.0-preview.1",
    11.     "com.unity.physics": "0.2.5-preview.1",
    12.     "com.unity.platforms": "0.2.1-preview.5",
    13.     "com.unity.render-pipelines.core": "7.2.1",
    14.     "com.unity.render-pipelines.universal": "7.2.1",
    15.     "com.unity.rendering.hybrid": "0.3.4-preview.24",
    16.  
    With the latest release of
    "com.unity.netcode": "0.1.0-preview.6",
    I've been able to update to the latest platforms.

    After much code refactoring to use the new netcode beginsend/endsend api, transport's writer/reader ref instead of context, and buildconfiguration types (and World.Active) (required modifying ghost template, and regenerating every ghost)
    It seems it finally does build for Android correctly by including the prefab rig assets. (maybe something to do with one update fixing subscenes and gameobjects? not sure)
    Though i may have broken the thinclients as now they're processing player inputs as well (could be due to how it uses world.active)

    It was only made possible through judicious use of deleting the library folder and all generated csproj/sln files after each upgrade or major script structure change.. Oh yes for some reason unity.build namespace could not be referenced by the build scripts... so i ended up having to add asmdefs to the main asset scripts, including separated ones for editor and tests folders needing explicit editor platform reference and nunit reference.

    Ah yes and this is working on 2019.3.3f1 (which apparently was just upgraded on the DOTSSample github page but with no actual changes to the project)
     
    Last edited: Mar 2, 2020
  38. NovaEiz3

    NovaEiz3

    Joined:
    Sep 6, 2017
    Posts:
    34
    Hello!
    There are 16 such errors in "Entities@0.6.0", how to fix them?

    Library/PackageCache/com.unity.entities@0.6.0-preview.24/Unity.Entities/Types/FastEquality.cs(297,42): error CS1061: 'UnsafeAppendBuffer' does not contain a definition for 'Size' and no accessible extension method 'Size' accepting a first argument of type 'UnsafeAppendBuffer' could be found (are you missing a using directive or an assembly reference?)
     
  39. NovaEiz3

    NovaEiz3

    Joined:
    Sep 6, 2017
    Posts:
    34
    The key solution was the package:
    "com.unity.collections": "0.5.2-preview.8".

    Aren't the necessary dependencies installed when installing the package?

    I also had to add asm def, it didn't work without it, it seems.

    Also, I had to replace the IBuildCompilation interface with another one ( I don 't remember which one ), and I don't remember which class I did it in.

    I didn 't delete the Library folder.

    Personally, I need to change a lot of code to run the project)
     
    Last edited: Mar 5, 2020
  40. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,803
    Only if the dependency isn't already forced to specific version in the manifest / package manager. This is the reason why in general you should avoid installing packages yourself which you know will be installed via dependency anyway.
     
  41. SurprisedPikachu

    SurprisedPikachu

    Joined:
    Mar 12, 2020
    Posts:
    61
    Are there any docs on how the sample works?
    There are lots of "hacky" stuff going on in the sample that I can't figure out why they are there.
     
    eatbuckshot likes this.
  42. followwind007

    followwind007

    Joined:
    Aug 1, 2017
    Posts:
    1
    System code spread anywhere makes it very difficult to understand logic, put anything in System Update and ignore the logic sequence may not be a good idea. kinda weird~
     
  43. eatbuckshot

    eatbuckshot

    Joined:
    Jan 10, 2016
    Posts:
    19
    I seem to have this issue where if I leave a server running for a long time, somewhere over 8 or so hours and a client connects and loads into the map, it'll freeze for almost half a minute or more, until it times out from the server... Any idea why this is happening? Could this be due to somehow simulating all the game ticks the server is up to?
     
  44. JonnyBGod

    JonnyBGod

    Joined:
    Aug 18, 2016
    Posts:
    2
    @eatbuckshot could you share your diff about the Netcode update?
     
  45. eatbuckshot

    eatbuckshot

    Joined:
    Jan 10, 2016
    Posts:
    19
  46. JonnyBGod

    JonnyBGod

    Joined:
    Aug 18, 2016
    Posts:
    2
    Thank you, this was very helpful.

    Did you happen to come across the following error?

    InvalidOperationException: RpcSystem received malformed packets or packets with the wrong version
    Unity.NetCode.RpcSystem+RpcExecJob.Execute (Unity.Entities.ArchetypeChunk chunk, System.Int32 chunkIndex, System.Int32 firstEntityIndex) (at Library/PackageCache/com.unity.netcode@0.1.0-preview.6/Runtime/Rpc/RpcSystem.cs:242)
    Unity.Entities.JobChunkExtensions+JobChunk_Process`1[T].ExecuteInternal (Unity.Entities.JobChunkExtensions+JobChunkData`1[T]& jobData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.entities@0.6.0-preview.24/Unity.Entities/IJobChunk.cs:275)
    Unity.Entities.JobChunkExtensions+JobChunk_Process`1[T].Execute (Unity.Entities.JobChunkExtensions+JobChunkData`1[T]& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at Library/PackageCache/com.unity.entities@0.6.0-preview.24/Unity.Entities/IJobChunk.cs:249)


    Extra debug info:

    else if (rpcIndex >= execute.Length)
    Debug.Log(ErrorCodes.InvalidRpc + " : " + rpcIndex + " : " + execute.Length);

    InvalidRpc : 29285 : 7
     
    Last edited: Mar 28, 2020
  47. alsharefeeee

    alsharefeeee

    Joined:
    Jul 6, 2013
    Posts:
    55
    Updated the DOTS Sample project to the latest yesterday and still can't run it on Unity 2019.3.6.
    For some reason the scene start but I can't move anything.
     
  48. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    484
    Me every time dotssample gets updated:

    :D clicks to see what changed:

    :(


    I'm confused about image shown on the latest roadmap video:

    Megacity lacks basic functionalities like physics, you can simply fly through all buildings
    FPS Sample is outdated and probably buggy as on github there's 70+ issues

    With this being said I can't see how they are Released. I'd call them - Abandoned.

    Next DOTS Sample:
    If you check github commits you can see that in 4 months it got only one small update. Code frequency graph shows it better:

    I'm not sure what "Prerelease focus" means. Does Unity still work on this project or it's joining The Abandoned Group? Why can't we see changes every week/month, contribute with pull requests, talk about used patterns etc? That's kind of what Unreal does with their engine itself.

    Hope to see that next roadmap live stream happening in few days will clear it up.
     
    Last edited: Mar 28, 2020
  49. darkid1

    darkid1

    Joined:
    Sep 5, 2017
    Posts:
    2
    Nice...Importing the package, my unity is stuck on resolving packages for hours... Any ideas on what could be the problem. i am using a higer version of unity by the way.
     
  50. XelasDev

    XelasDev

    Joined:
    Feb 20, 2016
    Posts:
    10
    I had the same issue. What worked for me was removing the FBX package from the manifest and adding it back via the Package Manager.
     
    pal_trefall likes this.
unityunity