Studio GuideWorld SDK Guide
Log In


Check out the properties exposed by ZEPETOScript.

Properties are the setting and options for the components that you can edit in Inspector.


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

AccessModifier propertyName: propertyType;

public playerNumber: float;
private playerLocation: Vector3;

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.

import { ZepetoScriptBehaviour } from 'ZEPETO.Script';
import { Vector3, GameObject, Transform } from 'UnityEngine';

export default class Properties extends ZepetoScriptBehaviour {

    public floatValue: float;
    public strValue: string;

    public gameObject: GameObject;
    public transformValue: Transform;



To access the properties from within the ZEPETOScript use Name.

Update() {
    console.log(`floatValue : ${this.floatValue}`);
    console.log(`strValue : ${this.strValue}`);

    // Rotate Cube_A
    const transform = this.gameOject.GetComponent<Transform>();

    // Rotate Cube_B

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.

public floatValues: float[];


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

// Public Property that does not need to be Serialized
public strValue: string;

// Property that should not be exposed on the Inspector
public strValue2: string;

// Private Property that needs to be Serialized
private strValue3: string;

// Addition of header above Property  
@Header("Header Title")
public stringProperty: string;

// Addition of spaces between Property
public numberProperty: number;

// Addition of tooltip that appears when the mouse is positioned on the Property
@Tooltip("This is Tooltip")
public transformProperty: Transform;

Below is an example screen when the Attribute is applied.