コード例 #1
0
    private void OnGUI()
    {
        if (GUILayout.Button("CreateCustomWindow"))
        {
            int a = CreateCustomWindow();
            //Debug.Log("a=" + a);
        }

        if (GUILayout.Button("DestroyCustomWindow"))
        {
            int a = DestroyCustomWindow();
            //Debug.Log("a=" + a);
        }


        if (GUILayout.Button("SetLogoutFunction"))
        {
            UnityDebugLog = (string str) => { Debug.Log(str); };
            SetUnityDebugLog(UnityDebugLog);
            TestLog();
            //Debug.Log("a=" + a);
        }

        if (GUILayout.Button("TestLog"))
        {
            TestLog();
            //Debug.Log("a=" + a);
        }


        // Profiler
        if (GUILayout.Button("SetUnityProfilerFunctions"))
        {
            UnityProfilerBeginSample          = (string str) => { Profiler.BeginSample(str); };
            UnityProfilerEndSample            = () => { Profiler.EndSample(); };
            UnityProfilerBeginThreadProfiling = (string groupName, string threadName) => { Profiler.BeginThreadProfiling(groupName, threadName); };
            UnityProfilerEndThreadProfiling   = () => { Profiler.EndThreadProfiling(); };
            SetUnityProfilerFunctions(UnityProfilerBeginSample, UnityProfilerEndSample, UnityProfilerBeginThreadProfiling, UnityProfilerEndThreadProfiling);
        }

        if (GUILayout.Button("StartTestUnityProfiler"))
        {
            StartTestUnityProfiler();
        }

        if (GUILayout.Button("EndTestUnityProfiler"))
        {
            EndTestUnityProfiler();
        }
    }
コード例 #2
0
 private static extern int SetUnityDebugLog(FunUnityDebugLog logfun);