public static void CreateContextObserver(Entitas.IContext context) { #if (!ENTITAS_DISABLE_VISUAL_DEBUGGING && UNITY_EDITOR) if (UnityEngine.Application.isPlaying) { var observer = new Entitas.Unity.VisualDebugging.ContextObserver(context); UnityEngine.Object.DontDestroyOnLoad(observer.gameObject); } #endif }
public static Context CreateContext(string name, int totalComponents, string[] componentNames, System.Type[] componentTypes) { var context = new Context(totalComponents, 0, new ContextInfo( name, componentNames, componentTypes) ); #if(!ENTITAS_DISABLE_VISUAL_DEBUGGING && UNITY_EDITOR) if(UnityEngine.Application.isPlaying) { var observer = new Entitas.Unity.VisualDebugging.ContextObserver(context); UnityEngine.Object.DontDestroyOnLoad(observer.gameObject); } #endif return context; }
public static Context CreateContext(string name, int totalComponents, string[] componentNames, System.Type[] componentTypes) { var context = new Context(totalComponents, 0, new ContextInfo( name, componentNames, componentTypes) ); #if (!ENTITAS_DISABLE_VISUAL_DEBUGGING && UNITY_EDITOR) if (UnityEngine.Application.isPlaying) { var observer = new Entitas.Unity.VisualDebugging.ContextObserver(context); UnityEngine.Object.DontDestroyOnLoad(observer.gameObject); } #endif return(context); }