chore: added assert for universe entrance manager issue
This commit is contained in:
@@ -19,6 +19,7 @@ public class UniverseEntranceManager : Internal.BehaviourIndependent
|
||||
// FIXME: This causes an issue when the UniverseEntranceManager is already attached to a UniverseObject then registered into a Universe,
|
||||
// the enter/exit universe collectors call OnUniverseObjectRegistered internally on Assign, but since the Universe calls the OnUniverseObjectRegistered
|
||||
// event it tries to call OnUniverseObjectRegistered again on the same object, causing a duplicate entry error.
|
||||
Debug.Assert.AssertTrue(BehaviourController.Count == 1, $"{nameof(UniverseEntranceManager)} must be in it's own {nameof(IUniverseObject)} with no other {nameof(IBehaviour)}s attached at the moment. Failing to do so might cause instantiation or serialization issues.");
|
||||
enterUniverses.Assign(universe);
|
||||
exitUniverses.Assign(universe);
|
||||
|
||||
|
Reference in New Issue
Block a user