You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidSpawnTree(Vector3position, GameObject[]availablePrefabs){Vector3truePos=new Vector3(position.x +(Random.value *MaxTreeOffset), position.y, position.z +(Random.value *MaxTreeOffset));// Actual position of each prefab that will be spawned inGameObjecttreeObj= Instantiate(availablePrefabs[Random.Range(0, availablePrefabs.Length)], truePos, Quaternion.identity);}}
Trees (which is the current demo option) should be spawning when running the GameManager - but they're not
This is what should be happening:
At first I was thinking that there was more wrong with the current iteration but then I realised the seed and wave maps are just different, so the terrain is obviously going to be composed of different biomes. We just need to figure out why these prefabs aren't spawning on top - and then we need to figure out how to interact with the prefabs (as when the game ends, the prefabs disappear and will then be regenerated in a different PCG iteration).
This is what we've currently got:
On the left we've got a height map with "island" configuration, on the right we've got a general biome setup.
Also in the above image, we see the ground material in the bottom right of the inspector which can be used in a similar role to this:
-L
The text was updated successfully, but these errors were encountered:
As per the new function in
TreeSpawner.cs
:Trees (which is the current demo option) should be spawning when running the GameManager - but they're not
This is what should be happening:
At first I was thinking that there was more wrong with the current iteration but then I realised the seed and wave maps are just different, so the terrain is obviously going to be composed of different biomes. We just need to figure out why these prefabs aren't spawning on top - and then we need to figure out how to interact with the prefabs (as when the game ends, the prefabs disappear and will then be regenerated in a different PCG iteration).
This is what we've currently got:
On the left we've got a height map with "island" configuration, on the right we've got a general biome setup.
Also in the above image, we see the ground material in the bottom right of the inspector which can be used in a similar role to this:
-L
The text was updated successfully, but these errors were encountered: