Custom Assets
Last updated
Last updated
This aims to show you how to spawn custom assets once you've followed Creating an assetbundle.
Once you got your .assets file, simply place it near your plugininfo.json file in your project as shown below.
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.
This will make players download your asset.
Now let's make it spawn with ClientAPI.InstantiateClientObject
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.
And just like that i can play mario kart in schedule I. Don't ask me why .