void addDebugComponent(Entity entity) { var debugBehaviour = new GameObject().AddComponent<EntityDebugBehaviour>(); debugBehaviour.Init(this, entity, _debugIndex); debugBehaviour.transform.SetParent(_entitiesContainer, false); var debugComponent = new DebugComponent(); debugComponent.debugBehaviour = debugBehaviour; entity.AddComponent(_debugIndex, debugComponent); }
void addDebugComponent(Entity entity) { var debugBehaviour = new GameObject().AddComponent <EntityDebugBehaviour>(); debugBehaviour.Init(this, entity, _debugIndex); debugBehaviour.transform.SetParent(_entitiesContainer, false); var debugComponent = new DebugComponent(); debugComponent.debugBehaviour = debugBehaviour; entity.AddComponent(_debugIndex, debugComponent); }