public void DisplayInspector() { if (_alignedButtonStyle == null) { _alignedButtonStyle = new GUIStyle(GUI.skin.button) { alignment = TextAnchor.MiddleLeft, wordWrap = true }; } if (Event.current.isKey && Event.current.keyCode == KeyCode.Return) { _userHasHitReturn = true; } while (_inspectorStack.Count > 0 && !_inspectorStack.Peek().EntryIsValid()) { var se = _inspectorStack.Pop(); RuntimeUnityEditorCore.Logger.Log(LogLevel.Message, $"[Inspector] Removed invalid/removed stack object: \"{se.Name}\""); } if (_inspectorStack.Count != 0) { _inspectorWindowRect = GUILayout.Window(_windowId, _inspectorWindowRect, InspectorWindow, "Inspector"); InterfaceMaker.EatInputInRect(_inspectorWindowRect); } }
public void DisplayInspector() { if (!Show) { return; } if (Event.current.isKey && (Event.current.keyCode == KeyCode.Return || Event.current.keyCode == KeyCode.KeypadEnter)) { _userHasHitReturn = true; } // Clean up dead tab contents foreach (var tab in _tabs.ToList()) { while (tab.InspectorStack.Count > 0 && !tab.InspectorStack.Peek().EntryIsValid()) { RuntimeUnityEditorCore.Logger.Log(LogLevel.Message, $"[Inspector] Removed invalid/removed stack object: \"{tab.InspectorStack.Peek().Name}\""); tab.Pop(); } if (tab.InspectorStack.Count == 0) { RemoveTab(tab); } } _inspectorWindowRect = GUILayout.Window(_windowId, _inspectorWindowRect, InspectorWindow, "Inspector"); InterfaceMaker.EatInputInRect(_inspectorWindowRect); }
private void Start() { me = this; grids = new GameObject[length, width]; for (int i = 0; i < length; i++) { for (int j = 0; j < width; j++) { grids[i, j] = Instantiate(gridPrefab); grids[i, j].GetComponent <GridScript>().row = i; grids[i, j].GetComponent <GridScript>().column = j; grids[i, j].transform.position = new Vector3(startPos.x + x_interval * i, startPos.y + y_interval * j, 0); } } }
public void DisplayWindow() { if (_completionsListingStyle == null) { _completionsListingStyle = new GUIStyle(GUI.skin.button) { border = new RectOffset(0, 0, 0, 0), margin = new RectOffset(0, 0, 0, 0), padding = new RectOffset(0, 0, 0, 0), hover = { background = Texture2D.whiteTexture, textColor = Color.black }, normal = { background = null }, focused = { background = Texture2D.whiteTexture, textColor = Color.black }, active = { background = Texture2D.whiteTexture, textColor = Color.black } }; } _windowRect = GUILayout.Window(_windowId, _windowRect, WindowFunc, "C# REPL Console"); InterfaceMaker.EatInputInRect(_windowRect); }