Hi guys! I followed the Unity Netcode guide: https://docs.unity3d.com/Packages/com.unity.netcode@0.6/manual/getting-started.html I have made all modifications related to the Changelog and the Upgrade guide section from here: https://docs.unity3d.com/Packages/com.unity.netcode@0.6/changelog/CHANGELOG.html I also have made some modifications to replace the use of the class ComponentSystem by the latest SystemBase class in all Systems and replace all PostUpdateCommands by the following: Code (CSharp): var ecb = new EntityCommandBuffer(Allocator.TempJob); Entities.WithStructuralChanges()... { ecb.AddComponent<....>(); }).Run(); ecb.Playback(EntityManager); ecb.Dispose(); I am ending up with some weird behavior, as you can see in the attached video. Sometimes my standalone client is well rendering the Player sometines not: Another issue, it seems that if I am not forcing Application.targetFrameRate = 60; in the entry point of my game I endup with a lot of "Large server tick prediction error". What I am wondering is, is it really the right approach to force the targetFrameRate like I did? Thank you very much!
Can you try adding RequireSingletonForUpdate< GhostPrefabCollectionComponent>() to GoinGameClientSystem.OnCreate to see if that fixes the missing graphics on some clients? You should not need to use Application.targetFrameRate, and I have not seen it have an effect on that specific error. Normally you only get the prediction tick error when you are at low frame rate.
Hi Tim! Thank you very much for you answer! I have to admit it you are the boss, the GhostPrefabCollectionComponent>() fixed the graphics/spawning issue on my standalone clients Regarding the prediction tick error, I have recorded a video to illustrate what I mean (I disabled Application.targetFrameRate). Seems to happen only when using the application in server only multiplayer mode: Otherwise I am very happy I managed to have made the modifications necessary to have the Unity Netcode Getting Started sample using the "new" SystemBase class for all of the systems.
Btw Tom there is something that worries me in this specific case: Code (CSharp): var ghostCollection = GetSingletonEntity<GhostPrefabCollectionComponent>(); var prefab = Entity.Null; var prefabs = EntityManager.GetBuffer<GhostPrefabBuffer>(ghostCollection); for (int ghostId = 0; ghostId < prefabs.Length; ++ghostId) ... How EntityManager.GetBuffer<GhostPrefabBuffer>(ghostCollection); did not throw any error as the GhostPrefabCollectionComponent was not ready and so on var ghostCollection = GetSingletonEntity<GhostPrefabCollectionComponent>(); was null?