Asset Replacement

From HEWIKI
Jump to: navigation, search

Contents

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 GUI

The asset replacement registry can be opened up through the HotSpot menu as seen in the screenshot.
Asset replacement hotspot.png


Asset Replacement Registry

Asset replacement sample.png
The Asset Replacement Registry will list all the current replacement mappings for a world. It lists the Old FQN for the original asset, the FQN for the new asset, and then the instance class that it will use when making the new asset. Instance classes are determined by the type of the new asset. HeroEngine uses the instance class to determine the appropriate properties of an asset and how to handle displaying it. A list of common instance classes are listed at the end of the page in a table.

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

Asset replacement add modify.png
Clicking the Add button will open up a window that allows you to define a new mapping. The first line is the old FQN of the asset to be replaced. The second line is for the new asset FQN. The third line is the instance class that the new asset should use.

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
Action Mark actionmarkinstance
Billboard billboardinstance
Flare flareinstance
Bone Tracker bonetrackerinstance
Model hgminstance
Heightmap heightmapinstance
Light node lightinstance
Mirror node mirrorinstance
Particle Emitter particleemitterinstance
Particle particleinstance
Path Follower pathfollowerinstance
Physics node physicsinstance
Region node regioninstance
Speedtree asset _speedtreeinstance
Vortex node vortexinstance
FMOD sound node audiofmodeventinstance

See Also

Edit System
Hotspot
Area Checkpoints
Asset Panel

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox