CREATE YOUR WORLD
Scripting

Property

5min

Check out the properties exposed by ZEPETOScript.

A property is a component setting and option that can be edited in the Inspector.

Using properties, you can manage the state and data of GameObjects or other components, and control access from outside.

Document image




ZEPETOScript is based on TypeScript as the programming language, consequently the following syntax is used for property declaration.

property




Properties declared this way are visible in the inspector, where you can assign values or objects to them. The values you assign will later be initialized at runtime.

Properties




Document image




To access the properties from within the ZEPETOScript use this.property Name.

TypeScript




When using multiple properties, declare them in an array in ZEPETOScript. Properties are shown in an array in the Inspector, where you can input data for different elements.

TypeScript




Document image




If you declare an Attribute in the script, you can control the Property on the Inspector.

property




Below is an example screen when the Attribute is applied.

Document image




For available attributes in ZEPETOScript, please refer to the following guide

📘 Please refer to the following guide. [List of Unity Functions Available at ZEPETO World]