# Custom Assets

This aims to show you how to spawn custom assets once you've followed [Creating an assetbundle](/docs/schedule-in-unity/creating-an-assetbundle.md).

Once you got your .assets file, simply place it near your plugininfo.json file in your project as shown below.\
![](/files/b9rgykzqKM1iHcdtYSTr)\
\
Then in your code in order to register it as a clientside bundle you simply have to use your plugin `RegisterClientsideBundle(fileName)` like shown below.<br>

```csharp
public void Start()
{
    string bundle = "circuit.assets";
    RegisterClientsideAssetBundle(bundle);
}
```

This will make players download your asset.\
Now let's make it spawn with `ClientAPI.InstantiateClientObject`

<pre class="language-csharp"><code class="lang-csharp"><strong>GameObject circuit = ClientAPI.InstantiateClientObject(bundle, "MarioCircuit", new Vector3(0, 3000, 0));
</strong></code></pre>

In the example above i'm spawning the GameObject named "MarioCircuit" at 3000units in the sky.\
You can spawn it at `0, 0, 0` so it'll be at the middle of the map in the ravin.\
\
In my example let's create a quick chat command so i can teleport to it.

```csharp
[ChatCommand("circuit")]
public static void TPCommand(Player player)
{
    player.Teleport(circuit.transform.position + new Vector3(0, 1, 0));
    player.SendChatMessage("You have been teleported to the Mario Circuit!");
}
```

\
And just like that i can play mario kart in schedule I.\
Don't ask me why :joy:.

<figure><img src="/files/DBN9cMlVPWbF68CnPw6w" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/2Wzygye6OmKovgyXKrHF" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://schedule-i-dedicated-servers.gitbook.io/docs/custom-assets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
