|
|
@@ -1,62 +1,69 @@
|
|
|
|
|
|
-Test new ScriptObject* system
|
|
|
-
|
|
|
-When I change an object in InspectableObject field I probably need to rebuild entire GUI hierarchy for that object. Right now I'm not.
|
|
|
-
|
|
|
-TODO
|
|
|
- - I need to prototype how to decently refresh the inspector while still keeping the input field active (e.g. adding a new array element)
|
|
|
- - Fix layout after new changes, especially pay attention to mActualHeight/mActualWidth stuff I had to remove
|
|
|
- - Actually add GUILayoutUtility to C# for calculating optimal and actual GUI element sizes
|
|
|
- - MAYBE just create a C++ GUI class that class updates when its size changes and allows the parent areas to resize as well.
|
|
|
- - However this will mean those child areas are updated one frame later
|
|
|
-
|
|
|
------------------------------------------------
|
|
|
-IMPLEMENTATION STEPS
|
|
|
-
|
|
|
-Get the current foldouts and fields rendering with just labels properly, currently they're positioned wrong
|
|
|
-Find a way to calculate inspector height so the inspector entries can be positioned exactly
|
|
|
-Port IntField to C# and use that instead of a simple label
|
|
|
-Ensure get/set value works as intended
|
|
|
-Ensure Undo/redo works as intended
|
|
|
- - This task needs decomposing. Likely need to port UndoRedo to C# first.
|
|
|
-Add hierarchical object fields and ensure they work/update properly
|
|
|
-Add array fields and ensure they work/update properly
|
|
|
-Similar to array add list and dictionary fields (will likely need SerializableDictionary & SerializableList classes)
|
|
|
-Add remaining field types
|
|
|
-
|
|
|
------------------------------------------------
|
|
|
-FINE GRAINED TASKS
|
|
|
-
|
|
|
-- Add GUIUtility and a way how to calculate GUILayout height for use in inspectors
|
|
|
-
|
|
|
-- Determine how will InspectorFields update child GUI elements. i.e. when number of elements in an array changes.
|
|
|
-
|
|
|
-- Ensure all C++ editor fields have:
|
|
|
- - onValueChanged
|
|
|
- - setValue/getValue
|
|
|
- - undo/redo functionality
|
|
|
-
|
|
|
-- Ensure that focus lost gets sent even when element gets destroyed. Otherwise UndoRedo buffer will fail to be properly cleared.
|
|
|
-
|
|
|
-- Extend text field so it can be multi-line
|
|
|
-- Add label to foldout
|
|
|
-- Extend GameObject field so it can only accept a certain type
|
|
|
-- Add ResourceField to C++
|
|
|
-
|
|
|
-- Port to C#:
|
|
|
- - IntField
|
|
|
- - FloatField
|
|
|
- - ColorField
|
|
|
- - ToggleField
|
|
|
- - TextField
|
|
|
- - Vector2Field
|
|
|
- - Vector3Field
|
|
|
- - Vector4Field
|
|
|
- - GameObjectField
|
|
|
- - ResourceField
|
|
|
+IMPLEMENTATION STEPS:
|
|
|
+2. Each GUIElement needs to be aware of its parent GUIArea
|
|
|
+
|
|
|
+3. In ScriptGUILayoutUtility I have no way of casting a MonoObject to GUIElementBase. This will likely require a refactor.
|
|
|
+
|
|
|
+4. When constructing ScriptObject I store it as actual type. But in ScriptGUIElement internal methods I expect ScriptGUIElementBase type.
|
|
|
+ This will also likely require a refactor. Related to above.
|
|
|
+
|
|
|
+TODO:
|
|
|
+ - Test GUIPanelContainer and make a C# wrapper. Ensure Inspector uses it.
|
|
|
+ - Think about how to handle arrays, adding and deleting elements from them.
|
|
|
+ - Add labels to foldouts
|
|
|
+ - Extend text field so it can be multi-line
|
|
|
+ - Port to C#:
|
|
|
+ - IntField
|
|
|
+ - FloatField
|
|
|
+ - ColorField
|
|
|
+ - ToggleField
|
|
|
+ - TextField
|
|
|
+ - Vector2Field
|
|
|
+ - Vector3Field
|
|
|
+ - Vector4Field
|
|
|
+ - GameObjectField
|
|
|
+ - ResourceField
|
|
|
+ - Ensure get/set value from inspector fields works
|
|
|
+ - Add array fields and ensure they work/update properly
|
|
|
+ - Extend GameObject field so it can only accept a certain type
|
|
|
+ - Ensure Undo/redo works as intended
|
|
|
+ - This task needs decomposing. Likely need to port UndoRedo to C# first.
|
|
|
+
|
|
|
+KEEP IN MIND:
|
|
|
+ - Inspector needs to be organized in such a way that scroll areas work. That should be possible with GUIPanelContainer.
|
|
|
+ - When inspector object changes I need to rebuild that inspector element
|
|
|
+ - This can happen if user drags a new object
|
|
|
+ - Or while the application is running objects might change from code
|
|
|
+ - Technically objects will never change their structure during runtime, this is only relevant for array sizes
|
|
|
+ - Modify C++ Editor fields so that calling setValue doesn't update the visual value until focus is lost
|
|
|
+ - When user is currently writing in an input box I don't want refresh to overwrite that value.
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
------------------------------------------------
|
|
|
-LESS IMPORTANT
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+----------------------------------------------
|
|
|
+
|
|
|
+LATER:
|
|
|
+ - Add support for list, dictionary and multi-rank array types
|
|
|
+ - Add tabbing between fields
|
|
|
|
|
|
A way to close a window & destroy a GUI panel!
|
|
|
- Will likely need to refactor ScriptEditorWindow as currently it performs initialization
|
|
|
@@ -76,22 +83,6 @@ UndoRedo should work on URI type basis where it remembers object ID, and path ac
|
|
|
- When trying to undo/redo and object id cannot be found, it just skips it
|
|
|
- When recompiling clear the undo/redo queue
|
|
|
|
|
|
-Things to think about/do:
|
|
|
- - Add EditorFields to C#
|
|
|
- - Inspectable fields need TAB support
|
|
|
- - Modify C++ GUIElement so I can do setNextTabElement(GUIElement*)
|
|
|
- - Inspectable fields need Undo/Redo support. Consider how to best implement it
|
|
|
- - C++ Undo/Redo system needs nested contexts
|
|
|
- - C++ Ensure that Undo/Redo works on per-field basis (undoing items within a field)
|
|
|
- - Add C# UndoRedo
|
|
|
- - Modify C++ Editor fields so that calling setValue doesn't update the visual value until focus is lost
|
|
|
- - When user is currently writing in an input box I don't want refresh to overwrite that value.
|
|
|
- - Expand/Collapse needs to work for both Components and their sub-objects (Structs, Arrays, etc.)
|
|
|
- - How do I refresh currently visible inspector fields.
|
|
|
- - Also how will this be done with custom inspectors, when I might not use InspectableObject
|
|
|
- - Multi-rank arrays aren't properly supported in InspectableObject
|
|
|
- - Dictionaries aren't properly supported in InspectableObject
|
|
|
- - Need a way to add entries to arrays/lists/dictionaries (possibly also clone and delete entries) from inspector
|
|
|
----------------------
|
|
|
|
|
|
Non-inspector:
|
|
|
@@ -100,11 +91,6 @@ Things to think about/do:
|
|
|
- Test if parsing int/float value from int/float field actually works
|
|
|
- ProfilerOverlay elements are constantly dirty? even though I'm not calling update
|
|
|
|
|
|
-Refactor BuiltinMaterialFactory to BuiltinEngineResources
|
|
|
-
|
|
|
-Cursor
|
|
|
- - A way to save/load a set of cursors
|
|
|
-
|
|
|
Undocking a window wont remove the tabbed title bar
|
|
|
While dragging an undocked window, dropping it over the main window (not over dock overlays) will not restore it
|
|
|
|
|
|
@@ -112,7 +98,4 @@ While dragging an undocked window, dropping it over the main window (not over do
|
|
|
- When dragging over GameObjectField cursor needs to change depending whether drop will be accepted or not
|
|
|
- How will I limit it to just certain component types?
|
|
|
|
|
|
-Make a common class for ScriptGUIElement as they all share:
|
|
|
- - Destroy(), DestroyInstance(), SetParent(), SetVisible() methods, and potentially others
|
|
|
-
|
|
|
Add InsertElement to GUILayout
|