Skip to content

Tips on using VKC Item Field

By using VKC Item Field, 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 VKC Item Field.

Basic Use

VKCItemFieldTips_1

When attaching child objects ObjectA, ObjectB, ObjectC, ObjectC2, ObjectC3 to an object with VKC Item Field attached, these objects will be included within the "Item" generated by VKC Item Field, 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 VKC Item Field.

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

VKCItemFieldTips_2

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

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

VKCItemFieldTips_3

The first Target requires the Item including the target node, which parent object VKCItemField2 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 VKCItemField 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 VKCItemField

VKCItemFieldTips_4

As above, placing an object with VKC Item Field within another object with VKC Item Field is an error.

Keep in mind as VKC Item Field objects should only be in the top-most objects.

2. Attaching VKCItemField to every objects

VKCItemFieldTips_5

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

On build, .heo files will be generated based on the objects with VKC Item Field 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 VKC Item Field.

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

VKCItemFieldTips_6

As above, if VKC Item Field and VKC Item Audio 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. +VKC Attribute Script

VKCItemFieldTips_7

VKC Item Field and VKC Attribute Script is allowed to be combined.

For instance, the Item defined by VKC Item Field can be used in VKC Attribute Script.

Wrap-up

Usage of VKCItemField

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