public static void UpdateVariable(long timeStamp, string variableName, float value) { if (!GraphItWindow.isVarTracerStart()) { return; } #if UNITY_EDITOR foreach (var VarBody in VarTracer.Instance.VariableBodys.Values) { if (VarBody.VariableDict.ContainsKey(variableName)) { var var = VarBody.VariableDict[variableName]; var.InsertValue(new VarDataInfo(value, VarTracerNet.Instance.GetCurrentFrameFromTimestamp(timeStamp))); } } #endif }
public static void SendEvent(long timeStamp, string eventName, float duration = 0, string desc = "") { if (!GraphItWindow.isVarTracerStart()) { return; } foreach (var varBody in VarTracer.Instance.VariableBodys) { foreach (var eName in varBody.Value.EventInfos.Keys) { if (eventName.Equals(eName)) { List <EventData> listEvent; varBody.Value.EventInfos.TryGetValue(eventName, out listEvent); listEvent.Add(new EventData(VarTracerNet.Instance.GetCurrentFrameFromTimestamp(timeStamp), eventName, desc, duration)); break; } } } }