예제 #1
0
        public static GameObject Create(EcsSystems systems, string name = null)
        {
            if (systems == null)
            {
                throw new ArgumentNullException("systems");
            }
            var go = new GameObject(name != null ? string.Format("[ECS-SYSTEMS {0}]", name) : "[ECS-SYSTEMS]");

            DontDestroyOnLoad(go);
            go.hideFlags = HideFlags.NotEditable;
            var observer = go.AddComponent <EcsSystemsObserver> ();

            observer._systems = systems;
            systems.AddDebugListener(observer);
            return(go);
        }