Hi :)
I´m working on a survival game on a planet. My spawn script for trees is already woring well on a regular sphere, but i want my planet to be an irregular mesh so I created another script. Now everytime I run the game Unity crashes. Can you help me out?
(Maybe the if in line 21 is the problem ...)
Thank you
TheSakuron
Here is my script for the irregular mesh :
.`using UnityEngine;
using System.Collections;
public class EnvironmentSpawner : MonoBehaviour {
public GameObject Planet;
public GameObject tree;
public GameObject PlanetOrigin;
public float UnicornCloudDistance;
public float TreeNumber;
public float MinSize;
public float MaxSize;
void Start () {
for(int i=0; i
↧