private void InitStringsArray() { FrameratePanel fp = target as FrameratePanel; fp.FramerateStrings = new string[MaxFPS + 1]; for (int i = 0; i < fp.FramerateStrings.Length; i++) { if (i >= fp.FramerateStrings.Length - 1) { fp.FramerateStrings[i] = i.ToString() + "+"; } else { fp.FramerateStrings[i] = i.ToString(); } } }
private void InitStringsArray() { FrameratePanel fp = target as FrameratePanel; fp.FramerateStrings = new string[MaxFPS + 1]; for (int i = 0; i < fp.FramerateStrings.Length; i++) { if (i >= fp.FramerateStrings.Length - 1) { fp.FramerateStrings[i] = i.ToString() + "+" + " (<" + (1000f / (float)i).ToString("F") + "ms)"; } else { fp.FramerateStrings[i] = i.ToString() + " (" + (1000f / (float)i).ToString("F") + "ms)"; } } }
public override void OnInspectorGUI() { DrawDefaultInspector(); if (GUILayout.Button("Init strings array")) { FrameratePanel fp = target as FrameratePanel; for (int i = 0; i < fp.FramerateStrings.Length; i++) { if (i >= fp.FramerateStrings.Length - 1) { fp.FramerateStrings[i] = i.ToString() + "+"; } else { fp.FramerateStrings[i] = i.ToString(); } } } }