Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug NetCode works only once with no error after I reinstall the package

Discussion in 'NetCode for ECS' started by Orimay, Jun 21, 2020.

  1. Orimay

    Orimay

    Joined:
    Nov 16, 2012
    Posts:
    304
    Every time I try to run my game, I get the following error:

    Code (CSharp):
    1. InvalidOperationException: Group of type Unity.NetCode.TickServerInitializationSystem has not been created, either the derived class forgot to call base.OnCreate(), or it has been destroyed
    2. Unity.Entities.ComponentSystemGroup.CheckCreated () (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities/ComponentSystemGroup.cs:67)
    3. Unity.Entities.ComponentSystemGroup.AddSystemToUpdateList (Unity.Entities.ComponentSystemBase sys) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities/ComponentSystemGroup.cs:72)
    4. Unity.NetCode.ClientServerBootstrap.CreateServerWorld (Unity.Entities.World defaultWorld, System.String name) (at Library/PackageCache/com.unity.netcode@0.2.0-preview.5/Runtime/ClientServerWorld/ClientServerBootstrap.cs:221)
    5. DreamCore.Game.Server.ModuleServer..ctor () (at Assets/DreamCore/Game/Server/ModuleServer.cs:147)
    6. DreamCore.Game.Server.S_Initialize_Server.OnCreate () (at Assets/DreamCore/Game/Server/S_Initialize.cs:23)
    7. Unity.Entities.ComponentSystemBase.CreateInstance (Unity.Entities.World world) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities/ComponentSystemBase.cs:434)
    8. Unity.Entities.World.AddSystem_OnCreate_Internal (Unity.Entities.ComponentSystemBase system) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities/World.cs:583)
    9. Unity.Entities.World.GetOrCreateSystemsAndLogException (System.Type[] types) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities/World.cs:790)
    10. UnityEngine.Debug:LogException(Exception)
    11. Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities/Stubs/Unity/Debug.cs:19)
    12. Unity.Entities.World:GetOrCreateSystemsAndLogException(Type[]) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities/World.cs:794)
    13. Unity.Entities.DefaultWorldInitialization:AddSystemsToRootLevelSystemGroups(World, Type[]) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:127)
    14. Unity.Entities.DefaultWorldInitialization:AddSystemsToRootLevelSystemGroups(World, IEnumerable`1) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:114)
    15. DreamCore.Game.Common.GameBootstrap:Initialize(String) (at Assets/DreamCore/Game/Common/Bootstrap.cs:16)
    16. Unity.Entities.DefaultWorldInitialization:Initialize(String, Boolean) (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities.Hybrid/Injection/DefaultWorldInitialization.cs:97)
    17. Unity.Entities.AutomaticWorldBootstrap:Initialize() (at Library/PackageCache/com.unity.entities@0.11.1-preview.4/Unity.Entities.Hybrid/Injection/AutomaticWorldBootstrap.cs:15)
    18.  
    It goes away and lets me run the game once after I manually remove NetCode package and install it again. After the first error-less run, I get the same error. Editor re-launch doesn't help. I use custom bootstrap, BTW, but there's nothing beyond the NetCode sample.
     
  2. Orimay

    Orimay

    Joined:
    Nov 16, 2012
    Posts:
    304
    Also, every time I run the game with no such error, my editor crashes :(