Esempio n. 1
0
File: CObject.cs Progetto: scris/_GS
    public static void StartWatch(object obj)
    {
#if COBJECT_DEBUGGER
        if (!CDebug.IsEditor || !Application.isPlaying || IsApplicationQuited)
        {
            return;
        }

        CAsync.AddMainThreadCall(() =>
        {
            try
            {
                var newDebugger         = new GameObject(string.Format("{0}-{1}", obj.ToString(), obj.GetType())).AddComponent <CObjectDebugger>();
                newDebugger.WatchObject = obj;

                CDebuggerObjectTool.SetParent(ContainerName, obj.GetType().Name, newDebugger.gameObject);

                Cache[obj] = newDebugger;
            }
            catch (Exception e)
            {
                CDebug.LogError(e.Message);
            }
        });
#endif
    }
Esempio n. 2
0
File: CObject.cs Progetto: scris/_GS
    public static void StopWatch(object obj)
    {
#if COBJECT_DEBUGGER
        if (!CDebug.IsEditor || !Application.isPlaying || IsApplicationQuited)
        {
            return;
        }

        CAsync.AddMainThreadCall(() =>
        {
            try
            {
                CObjectDebugger debuger;
                if (CObjectDebugger.Cache.TryGetValue(obj, out debuger))
                {
                    GameObject.Destroy(debuger.gameObject);
                }
            }
            catch (Exception e)
            {
                CDebug.LogError(e.Message);
            }
        });
#endif
    }
Esempio n. 3
0
    public static void StopWatch(object obj)
    {
        CAsync.AddMainThreadCall(() =>
        {
            try
            {
                if (!CDebug.IsEditor)
                {
                    return;
                }

                CObjectDebugger debuger;
                if (CObjectDebugger.Cache.TryGetValue(obj, out debuger))
                {
                    GameObject.Destroy(debuger.gameObject);
                }
            }
            catch (Exception e)
            {
                CDebug.LogError(e.Message);
            }
        });
    }
Esempio n. 4
0
    public static CAsync Start(AsyncThenDelegateEasy callback)
    {
        var async = new CAsync();

        return(async.Then(callback));
    }
Esempio n. 5
0
    public static CAsync Start(Action callback)
    {
        var async = new CAsync();

        return(async.Then(callback));
    }
Esempio n. 6
0
    public static CAsync Start()
    {
        var async = new CAsync();

        return(async);
    }
Esempio n. 7
0
 public static CAsync Start(AsyncThenDelegateEasy callback)
 {
     var async = new CAsync();
     return async.Then(callback);
 }
Esempio n. 8
0
    public static CAsync Start(Action callback)
    {
        var async = new CAsync();

        return async.Then(callback);
    }
Esempio n. 9
0
 public static CAsync Start()
 {
     var async = new CAsync();
     return async;
 }