для этой страницы,
отображается код на другом
For the object to be correctly integrated into the world, defining its position, inherent characteristics and outside appearance will be insufficient. Properties specify the way the object will behave and interact with other objects and the scene environment. A property can be thought of as a "material" for application logic.
- In the first case, properties can specify additional settings that extend the built-in ones (e.g., they can be used to specify if a node is interactive and whether it is a switch). For a character, properties can be used to specify health points or gold amount. You can assign multiple properties to a single node.
- In the second case, a property can specify certain parameters that can be used during physical interaction with the surface. For example, the property can indicate the type of the material assigned to the surface (wood, metal, plastic, etc.). Only one property can be assigned to a surface.
UNIGINE's Properties system includes the following:
- Manual properties implemented by programmers (including base ones).
- User properties inherited from the manual ones and adjusted via the UnigineEditor by 3D artists.
All properties in the project are organized in a hierarchy.
Manual properties are created and edited manually: they are displayed as read-only in the UnigineEditor. It is possible to modify them via API at run time (if the corresponding flag is set), but such changes won't be saved. To customize a manual property, you should either inherit a new user property from it or directly edit the corresponding *.prop file.
In the *.prop file of a manual property its name is stored. If a manual property is inherited from another manual property, the child's *.prop file will store a name-based reference to the parent. The GUID for the manual property is uniquely determined by its name and is generated at run time.
By default, UNIGINE provides 2 built-in read-only base properties: node_base and surface_base. You can also make custom base properties of your own.
User property is a property inherited from any other property via the UnigineEditor, it overrides the parameters of its parent.
The *.prop file of the user property contains its GUID and a GUID-based reference to the parent property. Such file is created automatically when inheriting a new property in the UnigineEditor. The set of user property parameters is determined by its parent, while their values can be modified.
Internal property is a property without a name. When cloning or inheriting a property, each new property becomes internal until a name is assigned to it. Internal properties are also created when you assign a property to a node.