void OnTriggerStay(Collider collider) { CloudMesh cloud = collider.GetComponent <CloudMesh>(); if (cloud != null) { cloud.RecalculatePosition(); } }
void CreateCloud() { GameObject obj = new GameObject(name + "-Cloud"); obj.transform.parent = transform; CloudMesh cloud = obj.AddComponent <CloudMesh>(); cloud.island = this; cloud.Init(); }