public override void OnGUI() { base.OnGUI(); GUI.contentColor = Color.green; GUI.skin.label.alignment = TextAnchor.MiddleLeft; GUI.skin.box.alignment = TextAnchor.MiddleLeft; GUI.skin.button.alignment = TextAnchor.MiddleLeft; if (viewObj != null) { GUI.Box(new Rect(0, 0, 700, Screen.height), ""); GUI.Box(new Rect(0, 0, 700, Screen.height), ""); } if (viewObj == null && GUILayout.Button("Collect")) { viewObj = new ViewObj(GameModuleFeature.Instance); } else if (viewObj != null && GUILayout.Button("Close")) { viewObj = null; } if (viewObj != null) { scroll = GUILayout.BeginScrollView(scroll); viewObj.DrawGUI(); GUILayout.EndScrollView(); } scroll += Input.mouseScrollDelta.y * Vector2.up * 0.1f; }
public ViewObj(int arrayIndex, ViewObj parent) { this.arrayIndex = arrayIndex; this.parent = parent; Reset(); }
public ViewObj(PropertyInfo info, ViewObj parent) { this.propertyInfo = info; this.parent = parent; Reset(); }
public ViewObj(FieldInfo info, ViewObj parent) { this.fieldInfo = info; this.parent = parent; Reset(); }