private static void InitialiseUI(SmartConsole instance) { s_font = instance.m_font; if (s_font == null) { Debug.LogError("SmartConsole needs to have a font set on an instance in the editor!"); s_font = new Font("Arial"); } s_fps = instance.AddChildWithGUIText("FPSCounter"); s_textInput = instance.AddChildWithGUIText("SmartConsoleInputField"); s_historyDisplay = new GameObject[k_historyLines]; for (int i = 0; i < k_historyLines; ++i) { s_historyDisplay[i] = instance.AddChildWithGUIText("SmartConsoleHistoryDisplay" + i); } instance.Layout(); }