示例#1
0
 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);
 }
示例#2
0
        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);
        }