Load OWT Terrain from disk, create agents from prefabs or from the scene.
Load OWT Terrain from disk, create agents from prefabs or from the scene.
Use the GOList Prefab or Add a new GameObject and attach the ResourceLoaderSystem script component to it.
Inside the component, its parameters are sorted into different sections.
Scene Game Objects
The GameObject must be in the GO List Scene GameObjects array.
Rideid agent = Globals.api.agentSystem.AddAgent(new Unit()
{
team = Team.Blue,
prefab = "*SCENE*ChrUsaArmyInfantryAcu01Prefab",
pos = new RideVector3(0,0,0)
});
Unit Prefabs
These are the list of prefabs you can instantiate into the scene. These prefabs should be linked in from the Unity Project window.
Rideid agent = Globals.api.agentSystem.AddAgent(new Unit()
{
team = Team.Blue,
prefab = "*PREFAB*ChrUsaArmyInfantryAcu01Prefab",
pos = new RideVector3(0,0,0)
});
Terrain Paths
A list of paths to Terrains which can be loaded and are accessible via the index into the array.
Globals.api.terrainSystem.LoadTerrain(index);