---
title: Property
slug: world-sdk-guide/property
docTags: 
createdAt: 2024-09-02T08:34:13.135Z
---

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.

![](https://api.archbee.com/api/optimize/fCt3n1oCa8rgNJ8fw9I2N-TtjUD0w2FHG0Fzi7jl0ns-20240904-102418.png)



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

:::CodeblockTabs
property

```typescript
AccessModifier propertyName: propertyType;

ex)
public playerNumber: float;
private playerLocation: Vector3;
```
:::



Properties declared this way are visible in the inspector, where you can assign values or objects to them.&#x20;

The values you assign will later be initialized at runtime.

:::CodeblockTabs
Properties

```typescript
import { ZepetoScriptBehaviour } from 'ZEPETO.Script';
import { Vector3, GameObject, Transform } from 'UnityEngine';
 
export default class Properties extends ZepetoScriptBehaviour {
 
    public floatValue: float;
    public strValue: string;
 
    public gameObj: GameObject;
    public transformValue: Transform;
    public vectorValue : Vector3;
 
}
```
:::



::Image[]{src="https://api.archbee.com/api/optimize/fCt3n1oCa8rgNJ8fw9I2N-Hrd5sbtJqT96or1zaz0yy-20240904-102418.png" size="84" width="455" height="249" position="center" showCaption="false"}



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

```typescript
import { ZepetoScriptBehaviour } from 'ZEPETO.Script';
import { Vector3, GameObject, Transform } from 'UnityEngine';
 
export default class Properties extends ZepetoScriptBehaviour {
 
    public floatValue: float;
    public strValue: string;
 
    public gameObj: GameObject;
    public transformValue: Transform;
    public vectorValue : Vector3;
     
     
    Start() {
        console.log(`floatValue : ${this.floatValue}`);
        console.log(`strValue : ${this.strValue}`);
    }
     
    Update() {
        // Rotate Cube_A
        const transform = this.gameObj.GetComponent<Transform>();
        transform.Rotate(this.vectorValue);
 
        // Rotate Cube_B
        this.transformValue.Rotate(this.vectorValue);
    }
}
```



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.

:::CodeblockTabs
TypeScript

```typescript
public floatValues: float[];
```
:::



![](https://api.archbee.com/api/optimize/fCt3n1oCa8rgNJ8fw9I2N-PCNPiBl9Tz6_AV7hH1dwk-20240904-102418.png)



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

:::CodeblockTabs
property

```typescript
import { ZepetoScriptBehaviour } from 'ZEPETO.Script';
import { Transform } from 'UnityEngine';
 
export default class Attribute extends ZepetoScriptBehaviour {
 
    // Public Property that does not need to be Serialized
    @NonSerialized()
    public strValue: string;
 
// Property that should not be exposed on the Inspector
    @HideInInspector()
    public strValue2: string;
 
// Private Property that needs to be Serialized
    @SerializeField()
    private strValue3: string;
 
// Addition of header above Property
    @Header("Header Title")
    public stringProperty: string;
 
// Addition of spaces between Property
    @Space(10)
    public numberProperty: number;
 
// Addition of tooltip that appears when the mouse is positioned on the Property
    @Tooltip("This is Tooltip")
    public transformProperty: Transform;
 
    Start() {   
 
    }
 
}
```
:::



Below is an example screen when the Attribute is applied.

![](https://api.archbee.com/api/optimize/fCt3n1oCa8rgNJ8fw9I2N-W3aT5oQs4enuO-f2RKvI4-20240904-102418.png)



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

:::hint{type="info"}
**📘&#x20;**&#x50;lease refer to the following guide. \[[List of Unity Functions Available at ZEPETO World](docId\:kCb1tTEPMHO_UM6-dV6Oa)]
:::

