コード例 #1
0
    public static JSONObject Create()
    {
#if POOLING
        JSONObject result = null;
        while (result == null && releaseQueue.Count > 0)
        {
            result = releaseQueue.Dequeue();
#if DEV
            //The following cases should NEVER HAPPEN (but they do...)
            if (result == null)
            {
                Debug.WriteLine("wtf " + releaseQueue.Count);
            }
            else if (result.list != null)
            {
                Debug.WriteLine("wtflist " + result.list.Count);
            }
#endif
        }
        if (result != null)
        {
            return(result);
        }
#endif
        return(new JSONObject());
    }
コード例 #2
0
        /// <summary>
        /// Logs the error.
        /// </summary>
        /// <param name="msgFormat">The MSG format.</param>
        /// <param name="args">The args.</param>
        protected virtual void LogError(string msgFormat, params object[] args)
        {
#if UNITY3D
            Debug.LogError(string.Format(msgFormat, args));
#else
            Debug.WriteLine(msgFormat, args);
#if NETFX_CORE
            LoggerManager.Default.LogError(LogOperationType.Trace, msgFormat, args);
#endif
#endif
        }
コード例 #3
0
        /// <summary>
        /// Logs the exception.
        /// </summary>
        /// <param name="exc">The exc.</param>
        /// <param name="ctxt">The CTXT.</param>
        protected virtual void LogException(Exception exc, Object ctxt)
        {
#if UNITY3D
            Debug.LogException(exc, ctxt);
#else
            Debug.WriteLine(exc);
#if NETFX_CORE
            LoggerManager.Default.LogError(LogOperationType.Trace, exc);
#endif
#endif
        }
コード例 #4
0
ファイル: GDebug.cs プロジェクト: Bgoon/GKit
        private static void LogPlatform(string text)
        {
#if OnUnity
            Debug.Log(
#else
            if (onConsole)
            {
                Console.WriteLine(text);
            }
            Debug.WriteLine(
#endif
                text);
        }