> For the complete documentation index, see [llms.txt](https://vc-docs.gitbook.io/engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vc-docs.gitbook.io/engine/home/doxygen_synced/classes/class_game_object.md).

# GameObject

**Usage:** `api.GameObject.Find("name")`

Find, create, destroy and change game objects. Accessed through `GameObject`.

## Public Functions

|                          | Name                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UnityEngine.GameObject   | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-find"><strong>Find</strong></a>(string name)<br>Finds a game object by name. Only finds objects created/registered through the script, not arbitrary objects already in the scene.</p>                                                                                                        |
| void                     | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-clientinstantiate"><strong>ClientInstantiate</strong></a>(GameObject go, Action< GameObject > callback)<br>Creates a copy of an object that exists only on this client — it is not networked and other players will not see it. The new copy is passed to your callback.</p>                  |
| void                     | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-instantiate"><strong>Instantiate</strong></a>(GameObject gameObject, Action< GameObject > callback)<br>Spawns a networked copy of an object so every player sees it. Spawning happens over the network, so the new object is delivered to your callback rather than returned immediately.</p> |
| void                     | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-destroy"><strong>Destroy</strong></a>(UnityEngine.GameObject gameObject)<br>Destroys a networked object for every player.</p>                                                                                                                                                                 |
| Component                | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-getcomponent"><strong>GetComponent</strong></a>(UnityEngine.GameObject gameObject, string name)<br>Gets a component on the object by type name.</p>                                                                                                                                           |
| UnityEngine.Component\[] | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-getcomponents"><strong>GetComponents</strong></a>(UnityEngine.GameObject go, string typeName)<br>Gets all components of the given type name on the object.</p>                                                                                                                                |
| void                     | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-addcomponent"><strong>AddComponent</strong></a>(UnityEngine.GameObject go, string typeName)<br>Adds a component of the named type to the object.</p>                                                                                                                                          |
| void                     | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-setcolor"><strong>SetColor</strong></a>(UnityEngine.GameObject go, Color color)<br>Sets the object's color. Only affects this object. Does nothing if the object has no renderer.</p>                                                                                                         |
| void                     | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-setmaintextureuvoffset"><strong>SetMainTextureUVOffset</strong></a>(UnityEngine.GameObject go, float u, float v)<br>Shifts the object's texture by the given amount. Only affects this object. Does nothing if the object has no renderer.</p>                                                |
| void                     | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#function-setmaintextureuvscale"><strong>SetMainTextureUVScale</strong></a>(UnityEngine.GameObject go, float u, float v)<br>Scales/tiles the object's texture by the given amount. Only affects this object. Does nothing if the object has no renderer.</p>                                            |

## Public Attributes

|                                                      | Name                                                                                                                                                                                                                                          |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dictionary< string, List< UnityEngine.GameObject > > | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_game_object.md#variable-createdgameobject"><strong>createdGameObject</strong></a><br>Registry of script-managed objects, keyed by name.</p> |

## Public Functions Documentation

### function Find

```csharp
static UnityEngine.GameObject Find(
    string name
)
```

Finds a game object by name. Only finds objects created/registered through the script, not arbitrary objects already in the scene.

**Parameters**:

* **name** The name the object was registered under.

**Return**: The object, or null if no object with that name exists.

### function ClientInstantiate

```csharp
static void ClientInstantiate(
    GameObject go,
    Action< GameObject > callback
)
```

Creates a copy of an object that exists only on this client — it is not networked and other players will not see it. The new copy is passed to your callback.

**Parameters**:

* **go** The object to copy.
* **callback** Receives the new copy. May be null.

### function Instantiate

```csharp
static void Instantiate(
    GameObject gameObject,
    Action< GameObject > callback
)
```

Spawns a networked copy of an object so every player sees it. Spawning happens over the network, so the new object is delivered to your callback rather than returned immediately.

**Parameters**:

* **gameObject** The object to spawn.
* **callback** Receives the spawned object once it is ready. May be null.

### function Destroy

```csharp
static void Destroy(
    UnityEngine.GameObject gameObject
)
```

Destroys a networked object for every player.

**Parameters**:

* **gameObject** The object to destroy.

### function GetComponent

```csharp
static Component GetComponent(
    UnityEngine.GameObject gameObject,
    string name
)
```

Gets a component on the object by type name.

**Parameters**:

* **gameObject** The object to look on.
* **name** The component type name.

**Return**: The component, or null if the object does not have one.

### function GetComponents

```csharp
static UnityEngine.Component[] GetComponents(
    UnityEngine.GameObject go,
    string typeName
)
```

Gets all components of the given type name on the object.

**Parameters**:

* **go** The object to look on.
* **typeName** The component type name.

**Return**: All matching components (empty if none).

### function AddComponent

```csharp
static void AddComponent(
    UnityEngine.GameObject go,
    string typeName
)
```

Adds a component of the named type to the object.

**Parameters**:

* **go** Target object.
* **typeName** Fully-qualified type name.

### function SetColor

```csharp
static void SetColor(
    UnityEngine.GameObject go,
    Color color
)
```

Sets the object's color. Only affects this object. Does nothing if the object has no renderer.

**Parameters**:

* **go** Target object.
* **color** Color to apply.

### function SetMainTextureUVOffset

```csharp
static void SetMainTextureUVOffset(
    UnityEngine.GameObject go,
    float u,
    float v
)
```

Shifts the object's texture by the given amount. Only affects this object. Does nothing if the object has no renderer.

**Parameters**:

* **go** Target object.
* **u** Horizontal offset.
* **v** Vertical offset.

### function SetMainTextureUVScale

```csharp
static void SetMainTextureUVScale(
    UnityEngine.GameObject go,
    float u,
    float v
)
```

Scales/tiles the object's texture by the given amount. Only affects this object. Does nothing if the object has no renderer.

**Parameters**:

* **go** Target object.
* **u** Horizontal tiling.
* **v** Vertical tiling.

## Public Attributes Documentation

### variable createdGameObject

```csharp
static Dictionary< string, List< UnityEngine.GameObject > > createdGameObject;
```

Registry of script-managed objects, keyed by name.

***

Updated on 2026-07-22 at 12:00:00 +0800
