Skip to content

Tips on using HEOField

By using HEOField, objects in the Unity scene will appear on the world after build, while unexpected errors and object misplacement may occur by misuse.

This article will explain the usage of HEOField.

Basic Use

HEOFieldTips_1

When attaching child objects ObjectA, ObjectB, ObjectC, ObjectC2, ObjectC3 to an object with HEOField attached, these objects will be included within the "Item" generated by HEOField, and displayed in the scene. (See Item for definition)

On the other hand, ObjectD will not be displayed in the scene, as it is not a child object of HEOField.

Also, ObjectA, ObjectB, ObjectC, ObjectC2, ObjectC3 are considered as "Nodes", which are subject to actions such as Show/HideNode, Enable/DisableCollider, and Enable/DisableClickableNode.

HEOFieldTips_2

As above, when putting ObjectD, ObjectE, ObjectF, and ObjectF2 as a child object of object HEOField2 with HEOField attached, these objects will be included within the Item "HEOField2", and shown in the scene.

HEOField2 has ObjectD, ObjectE, ObjectF, and ObjectF2 as a node.
Therefore, the action implementation for showing/hiding these nodes will be as below:

HEOFieldTips_3

The first Target requires the Item including the target node, which parent object HEOField2 is in this case, while the second Target requires the target object subject to the action.

If the Item-Object combination is wrong, such as setting the first target object to HEOField and the second to ObjectE, the action will not function.

Misuses and Errors

Below are misuses and errors, therefore avoid the following usages.

1. Parent-child relations of HEOField

HEOFieldTips_4

As above, placing an object with HEOField within another object with HEOField is an error.

Keep in mind as HEOField objects should only be in the top-most objects.

2. Attaching HEOField to every objects

HEOFieldTips_5

As "attaching HEOField will show the objects in the scene", this may seem correct, however HEOField is required only once unless intended to implement Dynamic Loading.

On build, .heo files will be generated based on the objects with HEOField attached. Therefore, implementations as above will cause multiple .heo files to be generated, resulting to unexpected resource bloating.

As much as possible, aim to reduce the count of HEOField.

3. Attaching other Item-generating HEO components to the object with HEOField

HEOFieldTips_6

As above, if HEOField and HEOAudio is attached to the same object on build, the same object will be counted redundantly as a separate object.

As objects with same names cause unexpected behavior, this implementation is discouraged.

Allowed Combinations

1. +HEOScript

HEOFieldTips_7

HEOField and HEOScript is allowed to be combined.

For instance, the Item defined by HEOField can be used in HEOScript.

2. +HEOReflectionProbe

HEOFieldTips_8

HEOFieldHEOReflectionProbe is allowed to be combined.

However, please make sure not to attach HEOField on the ReflectionProbe itself.

Wrap-up

Usage of HEOField

  • Generally 1 HEOField per scene
  • Attach to the top-most object (empty object if possible)
  • When using Dynamic Loading, use more than 2 HEOField components