|
@@ -0,0 +1,155 @@
|
|
|
|
+# Prefab Workflow Tests
|
|
|
|
+
|
|
|
|
+Testing in this area revolves around CRUD operations on prefabs, as well as spawning prefabs at runtime.
|
|
|
|
+
|
|
|
|
+## Project Requirements
|
|
|
|
+Any
|
|
|
|
+
|
|
|
|
+## Common Issues to Watch For
|
|
|
|
+
|
|
|
|
+Test guidance will sometimes note specific issues to watch for. The common issues below should be watched for through all testing, even if unrelated to the current workflow being tested.
|
|
|
|
+1. Console log errors/warnings/spam
|
|
|
|
+2. Asserts
|
|
|
|
+
|
|
|
|
+## Feature: Levels as Prefabs
|
|
|
|
+
|
|
|
|
+### Workflow 1: Basic Level/Entity CRUD
|
|
|
|
+
|
|
|
|
+[https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/](https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/)
|
|
|
|
+
|
|
|
|
+**Product:** myLevel.prefab, mylevel.spawnable, Levels running in Editor and game launcher
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:** 30 mins
|
|
|
|
+
|
|
|
|
+| Workflow | Requests | Things to Watch For |
|
|
|
|
+|-------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
+| Create a new/open an existing level | | * Errors reported upon opening a new level or an existing level<br>* Default environment is loaded (if there is one)<br>* Load times |
|
|
|
|
+| Create new entities | * Create entities and child entities in the Entity Outliner and some in the Viewport<br>* Drag prefab from Asset Browser<br>* Instantiate prefab from context menu<br>* Duplicating entities to create new copies<br>* Undo/Redo any of the above | * Entity Id<br>* Entity name<br>* Parent entity linked to (parent entity should be linked to the level prefab and child entities should be linked to its parent entities)<br>* Creating many entities (30+ entities) |
|
|
|
|
+| Edit Entities | * Add/remove components to an entity<br>* Change values of a property on a component<br>* Reparenting entities<br>* Copy & paste components from one entity to another<br>* Undo/Redo any of the above | * Adding multiple components to a single entity<br>* Components appearing in the viewport and how it changes after editing |
|
|
|
|
+| Remove Entities | * Remove parent entities, child entities, entities with components<br>* Undo/Redo any of the above | |
|
|
|
|
+| Save Level | * File > Save<br>* File > Save as<br>* Save level within another folder<br>* Overwrite an existing level<br>* Shortcut keys (Ctrl + S or Ctrl + Shift + S)<br>* Edit > Editor settings > Global Preferences > Prefabs to change the Save Prefabs Preferences<br> | * Level is saved in the correct location (o3de\Game Project\levels\<Level Name>\Level Name.prefab)<br>* Spawnable file is saved in correct location (o3de\Game Project\Cache\pc\levels\Level Name\Level Name.spawnable)<br>* Asset Processor errors with level processing<br>* After using "Save As" make some changes to the level such a deleting a few entities > Editor should remain stable<br><br>**Global Preferences/Save Prefabs = Ask every time**<ul>* has unsaved prefab changes > show new prefabs modal with list of unsaved prefabs<br>* has unsaved entities changes > simply saves level<br>* has both unsaved prefabs and entities changes > show new prefabs modal with list of unsaved prefabs<br>* has unsaved nested prefab > show new prefabs modal with list of unsaved prefabs including the nested prefab<br></ul>**Global Preferences/Save Prefabs = Save all**<ul>* All unsaved prefabs or entities should be saved along with the level<br></ul>**Global Preferences/Save Prefabs = Save none**<ul>* Only the level is saved along with any entities that were created in the level</ul> |
|
|
|
|
+| Load/Switch Levels | **Editor**<ul>* File > Open Level...<br>* Shortcut key (Ctrl + O)<br>* File > Open Recent<br>* Using the filter to find and load a specific level<br>* Switch levels a few times after adding prefabs to ensure that template is not stale<br>* Prefab Save modal appears if there are any unsaved prefab changes (only occurs if preferences is set to "Ask every time")</ul> **Game Launcher**<ul>* Console commands:<ul><br>*```LoadLevel <o3de dir>\<Game Project>\Cache\pc\levels\<Level Name>\<Level Name>.spawnable```<br>*```UnloadLevel <o3de dir>\<Game Project>\Cache\pc\levels\<Level Name>\<Level Name>.spawnable```<br></ul>* With the IMGUI gem enabled go to Levels→Load Level→ Select level/prefab to load from the list | * Load time<br>* All assets are loaded properly<br>* Exiting game mode works, no crashing<br>* After exiting game mode, editor should remain stable |
|
|
|
|
+| Exit Level | * File > Exit<br>* Closing the editor by clicking on the 'X' mark | * Has unsaved changes (either direct entity changes or changes within a prefab) > Show new level modal<br>* Has no unsaved changes > Simply close the level |
|
|
|
|
+| Run Game | * Press Ctrl + G to run game in the editor<br>* Run the level in the game launcher | * Game renders without crashing<br>* Camera is at the right position |
|
|
|
|
+
|
|
|
|
+## Feature: Basic Prefab Workflows
|
|
|
|
+
|
|
|
|
+### Workflow 1:Basic Prefab CRUD
|
|
|
|
+
|
|
|
|
+[https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/](https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/)
|
|
|
|
+
|
|
|
|
+**Product:**
|
|
|
|
+myPrefab.prefab
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:**
|
|
|
|
+1 hour
|
|
|
|
+
|
|
|
|
+| Use Case | Requests | Things to Watch For |
|
|
|
|
+|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
+| Create Prefab from entity | * Create Prefab from entity with child entities<br>* Create prefab from a single entity<br>* Create prefab from multiple entities<br>* Create prefab with multiple prefabs<br>* Create prefab with entities and prefab<br>* Create prefab from entities with components attached to them<br>* Create prefab after re-parenting (entity, prefab, nested prefab, nested entities, etc..)<br>* Create prefab from two entities that do not share the same parent (should have an error that pops up) | * Prefab is created with the correct parenting structure if it has child entities or prefabs<br>* Check that prefab is created with dark blue capsule around it<br>* All entities and prefabs should be inside the level container<br>* Errors in AP<br>* Saving level after prefab creation<br>* Instantiating prefab afterwards |
|
|
|
|
+| Save Prefab to disk | * Make some changes to the prefab then save via Right-clicking and selecting 'Save Prefab to File' (The asterisk \* symbol next to the prefab's filename, indicating that there are unsaved changes, should disappear once prefab is saved to file)<br>* Make some changes to the prefab and then press Ctrl + S keyboard shortcut | * When loading a level, if all prefabs have been saved to disk, then there should not be any asterisk \* symbols that indicate unsaved changes<br>* Changes are saved to prefab with the Right-click save option, but the prefab itself is not saved to the level unless the level is saved<br>* When using Ctrl + S the level is saved and then a prefabs save modal appears with list of unsaved prefabs (only occurs if preferences is set to "Ask every time") |
|
|
|
|
+| Instantiate Prefab | * Instantiate prefab by dragging the asset from Asset Browser<br>* Instantiate prefab via the context menu in Entity Outliner<br>* Instantiate a prefab in Viewport<br>* Instantiate a prefab level<br>* Instantiating existing prefabs (prefabs that are checked into the branch) | * Look at the Transform component and make sure that the prefab that has been instantiated is in the correct position<br>* Prefab level that has been instantiated should retain all the prefabs and entities within it<br>* Cyclical dependency error pops up when instantiating a prefab with itself |
|
|
|
|
+| Edit Prefab | * Enter prefab Focus mode via the Right-click context menu (or via double-clicking on prefab)<br>* Prefab changes the dark blue capsule surrounding the prefab to light blue and opens up the prefab container<br>* In prefab Focus mode, the user is able to select a child independently in the Viewport<br>* Exit prefab Focus mode via the Right-click context menu (or via double-clicking on prefab)<br>* Undo/Redo any of the above use cases | * Unsaved prefab edits/changes NOT being retained when re-instantiating |
|
|
|
|
+| Remove Prefab | * Delete a single prefab<br>* Delete the parent prefab with child entities or child prefabs<br>* Delete a child prefab under a root prefab<br>* Delete a child entity under a root prefab<br>* Undo/Redo any of the above use cases<br>* Deleting a prefab after duplicating it<br>* Deleting a prefab after instantiating it<br>* Deleting a level prefab that had been instantiated | * When undoing and redoing a deletion, the prefab should not change<br>* Deleting prefab should not cause any errors |
|
|
|
|
+
|
|
|
|
+### Workflow 2: Sharing Prefabs
|
|
|
|
+
|
|
|
|
+**Product:**
|
|
|
|
+myPrefab.prefab, myLevel.prefab
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:**
|
|
|
|
+30 minutes
|
|
|
|
+
|
|
|
|
+| Use Case | Requests | Things to Watch For |
|
|
|
|
+|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
+| Sharing individual prefabs | * Create a level with prefabs<br>* Save prefab to disk<br>* Give prefab file to another person <br> (prefab file located in \<GAME PROJECT DIR>\\Prefabs\\\<prefab name>.prefab) | * AP automatically picking up the prefab level and processing it<br>* The users must have matching projects or at least the following to share prefabs: <br> \<GAME PROJECT DIR>\\Registry\\assets\_scan\_folders.setreg <br> \<GAME PROJECT DIR>\\Gem\\Code\\tool\_dependencies.cmake <br> \<GAME PROJECT DIR>\\Gem\\Code\\runtime\_dependencies.cmake |
|
|
|
|
+| Sharing level prefabs | * Create a level with entities and prefabs<br>* Save the level<br>* Give prefab file to another person<br> <br> (level file located in \<GAME PROJECT DIR>\\Levels\\<level name>\\\<level name>.prefab) | * The users must have matching projects or at least the following to share prefabs:<br> \<GAME PROJECT DIR>\\Registry\\assets\_scan\_folders.setreg <br> \<GAME PROJECT DIR>\\Gem\\Code\\tool\_dependencies.cmake <br> \<GAME PROJECT DIR>\\Gem\\Code\\runtime\_dependencies.cmake |
|
|
|
|
+| Load individual prefabs as levels | * Take a prefab from the prefab game folder and place it inside the level folder<br>* Launch Editor and load the prefab level | |
|
|
|
|
+
|
|
|
|
+### Workflow 3: Reparenting Prefab and Entities
|
|
|
|
+
|
|
|
|
+[https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/](https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/)
|
|
|
|
+
|
|
|
|
+**Product:**
|
|
|
|
+Nested hierarchies of prefabs/entities
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:**
|
|
|
|
+10 minutes
|
|
|
|
+
|
|
|
|
+| Use Case | Requests | Things to Watch For |
|
|
|
|
+|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
+| Reparenting Prefabs | * Reparenting prefab under a prefab<br>* Reparenting prefab under an entity<br>* Reparenting prefab under nested prefabs<br>* Reparenting prefab under nested entities<br>* Reparenting prefab under nested prefabs and entities<br>* Reparenting a nested prefab under all the above scenarios<br>* Undo/redo of any of the above use cases | * The order of the prefabs and their respective child entities/prefabs<br>* Saving level or prefabs after re-parenting prefabs<br>* Instantiating prefabs after re-parenting<br>* Reparenting prefabs to another prefab should NOT change it's world position |
|
|
|
|
+| Reparenting Entities | * Reparenting entity under an entity<br>* Reparenting entity under a prefab<br>* Reparentingentity under nested entities<br>* Reparentingentity under nested prefabs<br>* Reparentingentity under nested prefabs and entities<br>* Reparenting a nested entity under all the above scenarios<br>* Undo/redo of any of the above use cases | * The order of the entities under the parent prefab/entities |
|
|
|
|
+
|
|
|
|
+### Workflow 4: Detach
|
|
|
|
+
|
|
|
|
+[https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/](https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/)
|
|
|
|
+
|
|
|
|
+**Product:**
|
|
|
|
+Non-prefab entity hierarchy
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:**
|
|
|
|
+5 minutes
|
|
|
|
+
|
|
|
|
+| Use Case | Requests | Things to Watch For |
|
|
|
|
+|------------------------------------------------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|
|
|
|
|
+| Can detach a prefab | * RMB on prefab and select "Detach Prefab..."<br>* Undo/redo the above request | * Detaching prefabs within prefabs or prefabs within entities<br>* The structure of the entities after detaching |
|
|
|
|
+| Can detach a child prefab from the root prefab | * RMB on child prefab and select "Detach Prefab..."<br>* Undo/redo the above request | |
|
|
|
|
+
|
|
|
|
+### Workflow 5: Duplicate
|
|
|
|
+
|
|
|
|
+[https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/](https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/)
|
|
|
|
+
|
|
|
|
+**Product:**
|
|
|
|
+Multiple exact copies of prefabs or entities inside a level
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:**
|
|
|
|
+10 minutes
|
|
|
|
+
|
|
|
|
+| Use Case | Requests | Things to Watch For |
|
|
|
|
+|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
+| Duplicating prefabs | * Duplicate a single prefab<br>* Duplicate parent prefab with child entities<br>* Duplicate parent prefab with child prefabs<br>* Duplicate parent prefab with both child prefabs and entities<br>* Delete duplicated prefab<br>* Undo/redo duplication | * The structure of nested prefabs after duplication should remain the same<br>* Components attached to prefabs should remain the same<br>* After duplicating prefab, it should select the new instance that was duplicated |
|
|
|
|
+| Duplicating entities | * Duplicate a single Entity<br>* Duplicate parent Entity with child entities<br>* Duplicate parent Entity with child Entities<br>* Duplicate parent Entity with both child prefabs and entities<br>* Delete duplicated entities<br>* Undo/redo duplication | * The structure of nested entities after duplication should remain the same<br>* Components attached to entities should remain the same |
|
|
|
|
+
|
|
|
|
+### Workflow 6: Performance
|
|
|
|
+
|
|
|
|
+**Product:**
|
|
|
|
+None
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:**
|
|
|
|
+10 minutes
|
|
|
|
+
|
|
|
|
+| Use Case | Requests | Things to Watch For |
|
|
|
|
+|------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
+| Undo/Redo changes with multiple prefabs | * Instantiate mulitiple prefabs<br>* Duplicate multiple prefabs<br>* Translate with multiple prefabs selected<br> * Move<br> * Scale<br> * Rotate<br>* Undo/redo changes made with multiple prefabs selected | * Long hitch times when performing undo/redo on multiple prefabs<br>* Wait times should roughly match the time it took to make those changes<br>* Entity Inspector window is open |
|
|
|
|
+| Undo/Redo changes with multiple entities | * Create multiple entities<br>* Duplicate multiple entities<br>* Translate with multiple entities selected<br> * Move<br> * Scale<br> * Rotate<br>* Undo/redo changes made with multiple entities selected | * Long hitch times when performing undo/redo on multiple entities<br>* Wait times should roughly match the time it took to make those changes<br>* Entity Inspector window is open |
|
|
|
|
+
|
|
|
|
+## Feature: Dynamic Spawning
|
|
|
|
+
|
|
|
|
+Testing in this area should revolve primarily around Script Canvas configuration to spawn or despawn prefabs in Game Mode.
|
|
|
|
+
|
|
|
|
+### Workflow 1: Spawning a prefab via Script Canvas
|
|
|
|
+
|
|
|
|
+https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/spawn-a-prefab/
|
|
|
|
+
|
|
|
|
+**Product:**
|
|
|
|
+Runtime spawnables using ScriptCanvas Scripting
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:**
|
|
|
|
+30 minutes
|
|
|
|
+
|
|
|
|
+| Use Case | Requests | Things to Watch For |
|
|
|
|
+|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
|
|
|
|
+| Spawn a prefab with Script Canvas | * Create an entity with a mesh and Script Canvas component<br>* Create a Script Canvas graph with the following nodes and variables:<ul> * On Graph Start<br> * Create Spawn Ticket<br> * Spawn<br> * Delay<br> * Despawn<br> * Game Entity<br> * EntitySpawnTicket (Variable)<br> * SpawnableScriptAssetRef (Variable)</ul>* Save script canvas graph and set it to the script canvas component of the prefab<br>* Run game mode | * Changes to node input/output options after saving or reloading script canvas graph. |
|
|
|
|
+
|
|
|
|
+### Workflow 2: Spawning a prefab via Lua API
|
|
|
|
+
|
|
|
|
+**Product:**
|
|
|
|
+Runtime spawnables using Lua Scripting
|
|
|
|
+
|
|
|
|
+**Suggested Time Box:**
|
|
|
|
+10 minutes
|
|
|
|
+
|
|
|
|
+| Use Case | Requests |
|
|
|
|
+|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
|
|
+| Spawn a prefab with Lua API | * Create an entity with a Lua Script component<br>* Assign multiple spawnable prefabs<br>* Create multiple entities with various Lua scripts<br>* Create custom script events via the Asset Editor<br>* Configure various spawn delay values<br>* Run Game mode |
|