Give Page Feedback

World Designer Tool - Advanced Asset Operations

Advanced Asset Operations include the Destroy Selected Objects, Assignment, Transfer, and Evaluation operations. Note that an automatic Evaluation Operation is performed immediately following one of the other operations. This Section briefly covers each Operation, however for detailed information on the Evaluation, Transfer, and Assignment Operations, please see their dedicated Sections.

General Advice For All Operations

For all Operations, it is recommended to keep the number of game objects or Cells you perform the operations on low at first, to ensure that your Scriptable Assets and World Designer Tool are configured correctly, as misconfiguration can lead to hard to correct issues.

We also recommend making a backup of your scene before performing any of the advanced operations, as use of these operations is somewhat experimental and we would hate for an error in their use resulting in data loss!

The Transfer and manual Evaluation Operations both function by loading the LOD specific Asset Chunks belonging to all selected Cells into the Unity Editor. If you are not careful, this can result in too many Assets being loaded into the editor, resulting in slow processing times or even Editor crashes.

Of course, the number of Asset Chunks that you can safely load into the Editor will depend on the memory used by those Asset Chunks, so there is no fixed amount that we can advise trying to stay under. You should always start with a small number of Cells/Asset Chunks, and only proceed to selecting more Cells (which will result in more Asset Chunks being loaded) if you don't run into any issues. You can also use Task Manager or your Operating Systems resource tracking software to monitor the memory used by Unity during operations, to see how much wiggle room you have in future operations.

When a Cell is enabled and unloaded in the World Designer Tool, you will see the number of Chunks used by that Cell for LOD 1, below the row/column/layer indexes of the Cell. This can aid you in determining how many Cells to select for a Transfer or Evaluation Operation.

Also note that these advanced operations are only valid for Game Object based Assets. For other Asset Types, only the Load, Unload, and Save operations are available, and you must create custom Asset Managers in order to use them.

Evaluation Operation

This operation evaluates selected Streamable Cells for a given LOD Group by examining the number of child objects on each Asset Chunk (if using Multi-Chunking) creating/destroying/rebalancing Asset Chunks (again, if using Multi-Chunking), and determining if Cells should be disabled and their Assets destroyed (if the Asset Chunks of the Cells are non existent or empty and the Auto Disable and/or Auto Destroy setting are enabled).

This operation can be performed manually using the E* button or can be performed automatically as a result of another advanced operation being performed.

Assignment Operation

The Assignment Operation can only be used manually via the A* button found on each LOD in the Cell Color Key. This operation takes a collection of Game Objects in open scenes and calculates which Streamable Grid Cell (for the Grouping being edited) they fall within (either according to their position or the center position of their mesh bounds). It then assigns those objects as children of the Asset Chunks associated with whichever LOD the Assignment Operation was initiated for.

Transfer Operation

The Transfer Operation can be used manually via the T* button (found on each LOD in the Cell Color Key) or Transfer All LODs button.

The T button is a single LOD operation that loads all Asset Chunks for the given LOD for all selected Cells (and unloads Asset Chunks for other LODs if loaded for the selected Cells), and performs an Assignment Operation for all child game objects on those Asset Chunks, where the World Grouping and LOD to assign to is set by the developer via the Transfer Grouping and Transfer LOD settings found below the Cell Color Key.

Note that it is perfectly valid for this Transfer Grouping and Transfer LOD to be the same Grouping and LOD that the Transfer Operation was initiated for, which can be used to confirm that Game Object children belonging to those Cells have been assigned correctly.

The Operation is effectively the same as an Assignment Operation, however the game objects to assign are the child game objects belonging to the LOD Asset Chunks of the selected cell. This is a great way to move child game objects to other World Groupings or LODs.

Destroy Selected Objects

The Destroy Selected Objects Operation can only be used manually via the button of the same name, which can be found at the bottom of the Editing Controls tab of the Main Contols window.

While you can destroy objects manually, doing so will not remove unneeded Asset Chunks or automatically disable Cells when they are 'Empty', and as such, it is not recommended. Using this operation has the same effect as destroying the objects manually, with the added benefit of an Evaluation Operation being performed on all affected Asset Chunks and Cells.

Performance Tips

The Advanced Operations can take a long time to complete in some instances, especially when operating on a large number of Cells or Asset Chunks. This is especially true because the operations make use of many AssetDatabase based methods, which are generally slow and unoptimized for use with batch operations.

With that said, there are a few things you can do to ensure the Operations function as fast as possible. These include (in order of importance):

1) Using a clean editing scene. To accomplish this, you should remove all game objects in the scene that are not required when performing one of the Advanced Operations (usually, anything not related to SAM).

This is especially true when using third party scripts if those scripts contain callbacks for certain Unity actions/events (on scene loaded, for instance). In most cases, these callbacks are not required to be present when manipulating Asset Chunks and only increase the time it takes for the Advanced Operations to complete.

2) Hiding the Scene Hierarchy, Scene View, and Game View windows. Because Asset Chunks are loaded into the Editor by most of the Advanced Operations, hiding these windows can free up some resources that would otherwise be devoted to them (note, we cannot guarantee how much of an improvement, if any, this will provide).