void Start() { GameObject pm = GameObject.Find("ParticleManager"); if (pm) { pm.GetComponent <ParticleManager>().updateParticleBoundary(boundariesLow, boundariesHigh); //deal with editor placed objects ComputeAttractors ca = GameObject.Find("ParticleManager").GetComponentInChildren <ComputeAttractors>(); foreach (GameObject g in GameObject.FindGameObjectsWithTag("Attractor")) { ca.AddAttractor(new Vector2(g.transform.localPosition.x, g.transform.localPosition.y)); } } }
void Awake() { ca = GameObject.Find("ParticleManager").GetComponentInChildren <ComputeAttractors>(); transform.hasChanged = false; autoplace = true; }