Asset Replacement Overview
The asset replacement handler is a tool for replacing all assets in a world during development time when an old asset is desired to be replaced with a new one. When an area's edit instance spins up it will check the defined asset replacements and update any old assets with the defined replacement. When the update is performed all of the old asset's properties are transferred to the new asset if possible, i.e. if both assets have the scale property the new asset would have the same scale value as the old asset.
What Asset Replacement Does Not Do
The asset replacement registry does not spin up areas automatically so it is up to the end user to load area's edit instances to process asset replacements. It is important to note that asset replacement is indiscriminate on what areas it will do replacements in. It does the replacement whenever any area's edit instance spins up in the world. A system generated Area Checkpoint is created for the area whenever this is done so any automatic replacements can be undone.
During world building it may be desired to do a live update of an asset to see how it will look immediately before committing the replacement to the registry. In these cases the assets panels 'Replace Selected Instance With This Asset' should be used. More information on this can be found here http://wiki.heroengine.com/wiki/Asset_panel#Asset_Menu.
How To Use the Asset Replacement GUI
Opening The Asset Replacement GUIThe asset replacement registry can be opened up through the HotSpot menu as seen in the screenshot.
Asset Replacement Registry
There are buttons for adding, editing, or removing a replacement mapping. Also there is a search bar on the bottom to filter the displayed mappings if you are looking for a specific asset replacement.
Adding a New Replacement Mapping
Once these three fields are set press 'add' or 'modify' and it will update the replacement mapping and appear in the browser. Entries in the browser can edited by double clicking on a entry or by first selecting the entry to be edited and then clicking on the edit button. Selecting an entry and then pressing the remove button will remove the entry from the map and no more assets will be replaced using that mapping.
NOTE: removing a mapping does not revert assets that were previously replaced. Once an instance of an asset is replaced the previous instance of that asset is removed. A system generated Area Checkpoint is made before any replacements happens so areas can be reverted if desired.
Asset Class Information
The class used for a replacement must match the registered type. All assets use a specific class to properly display and control the asset. These types are registered with the Edit System Node. The classes can be queried by running the command '/heedit LISTALLASSETTYPES' while connected to a HeroCloud world. The table below lists some of the most common assets for quick reference.
|Asset Type||Class Name|
|FMOD sound node||audiofmodeventinstance|