コード例 #1
0
        static void Init()
        {
            // Get existing open window or if none, make a new one:
            VarTracerWindow window = (VarTracerWindow)EditorWindow.GetWindow(typeof(VarTracerWindow), false, "VarTracerWindow");

            window.minSize = new Vector2(230f, 50f);
            window.Show();
        }
コード例 #2
0
        public static void UpdateVariable(string groupName, string variableName, long timeStamp, float value)
        {
            if (!VarTracerWindow.isVarTracerStart())
            {
                return;
            }
            if (!VarTracer.Instance.groups.ContainsKey(groupName))
            {
                var body = new VarTracerGroup(groupName);
                body.VariableDict[variableName]      = new VarTracerVariable(variableName, groupName);
                VarTracer.Instance.groups[groupName] = body;
            }

            var variableDict = VarTracer.Instance.groups[groupName].VariableDict;

            if (!variableDict.ContainsKey(variableName))
            {
                variableDict[variableName] = new VarTracerVariable(variableName, groupName);
            }
            variableDict[variableName].InsertValue(new VarDataInfo(value, VarTracerNet.Instance.GetCurrentFrameFromTimestamp(timeStamp)));
        }
コード例 #3
0
        public static void SendEvent(string groupName, long timeStamp, string eventName, float duration = 0)
        {
            if (!VarTracerWindow.isVarTracerStart())
            {
                return;
            }

            if (!VarTracer.Instance.groups.ContainsKey(groupName))
            {
                var body = new VarTracerGroup(groupName);
                VarTracer.Instance.groups[groupName] = body;
            }

            var eventInfo = VarTracer.Instance.groups[groupName].EventInfos;

            if (!eventInfo.ContainsKey(eventName))
            {
                VarTracer.Instance.groups[groupName].RegistEvent(eventName);
            }

            eventInfo[eventName].EventDataList.Add(new EventData(timeStamp, eventName, duration));
        }
コード例 #4
0
 public static void StopVarTracer()
 {
     VarTracerWindow.StopVarTracer();
 }