public virtual void OnDisable() { ComponentPoolSystem.Unregister(this); if (Entity) { Entity.Registry.UnregisterECSComponent(this); } entity = null; }
public virtual void OnEnable() { ComponentPoolSystem.Register(this); if (Entity) { Entity.Registry.RegisterECSComponent(this); } if (!m_initialized) { Initialize(); m_initialized = true; } }