private void Start() { EntityManager = World.DefaultGameObjectInjectionWorld.EntityManager; hits = new NativeList <SaberNoteHitData>(4, Allocator.Persistent); detectionSystem = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <SaberHitDetectionSystem>(); }
private void OnEnable() { if (detectionSystem == null) { detectionSystem = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <SaberHitDetectionSystem>(); } detectionSystem.RegisterController(this); }