|
|
@@ -27,33 +27,36 @@ return them in checkForModifications?
|
|
|
---------------------------------------------------------------------
|
|
|
Prefab diff
|
|
|
|
|
|
+TODO - Recursively generating prefab diffs doesn't work. e.g. if one prefab has multiple prefab children we just generate a single
|
|
|
+ diff for the top-most parent but I should probably generate one for each prefab?
|
|
|
+ - The same issue is with updateFromPrefab - presumably it should update all child prefabs as well
|
|
|
+
|
|
|
+TODO - When clearing a scene I need to be able to persist certain elements (e.g. editor-only stuff)
|
|
|
+
|
|
|
+TODO - How do I mark the scene as modified? I need to know if user made any modifications to the scene to
|
|
|
+ ask him before loading another scene or exiting.
|
|
|
+ - Just have a EditorUtility.SetDirty for the resource? This means I would need to use this general
|
|
|
+ approach for all resources, but I probably need that since likely I want to save all modified resources
|
|
|
+ before editor exits? Think about this.
|
|
|
+
|
|
|
+TODO - I should add a "prefabHash" to each scene object so I know when I need to call updateFromPrefab and when not.
|
|
|
+ Otherwise I need to call it every time I instantiate a prefab.
|
|
|
+
|
|
|
Level save
|
|
|
- - Entry in File menu (Ctrl + S)
|
|
|
- - Clicking it opens up a save file dialog unless level is already linked to prefab
|
|
|
- Drag and drop to project window
|
|
|
- Automatically creates a new prefab with the same name as the root object
|
|
|
- Or creates a unique name if an asset with the same name exists
|
|
|
- - Whenever I save I need to go through all prefab instances and update their diffs (Make this editor only, but level saving should be editor only all together)
|
|
|
|
|
|
Level load
|
|
|
- - Entry in File menu (Ctrl + L)
|
|
|
- - Opens up a file open dialog
|
|
|
- Drag and drop from project window or double-click in project window
|
|
|
- - Unloads the current level and loads the new one
|
|
|
- - TODO - If current level is modified ask the user to confirm?
|
|
|
- - After loading a new scene always perform an "updateFromPrefab" action on all prefab instances (Make this editor only)
|
|
|
- - TODO - Should I monitor for prefab changes so I don't update unless prefab actually changed?
|
|
|
- - Have each scene object have a prefabHash stored, and prefab hash should increase whenever it is saved.
|
|
|
- This way I can check if I really need to update the prefab instance.
|
|
|
-
|
|
|
-TODO - Prefabs should be editor only, especially automatic diff creation and updates on load
|
|
|
- - In C# instead of having prefab stuff on SceneObject, move it to BansheeEditor.PrefabUtility
|
|
|
|
|
|
TODO - Add Prefab buttons to Inspector (Apply, Break, Revert)
|
|
|
|
|
|
TODO - Later - When building level for release make sure to clear all prefab diffs (possibly store them elsewhere in the first place)
|
|
|
+ - And all prefab instances should have updateFromPrefab called on them.
|
|
|
|
|
|
Test (likely later once I have more editor functionality working):
|
|
|
+ - If level save/load works
|
|
|
- Game object handle compare
|
|
|
- ID restore systems
|
|
|
- Native+Managed diff (only the link between the two)
|