// Use this for initialization void Start() { mopCollider = GameObject.Find("MopC").GetComponent <Collider>(); myPile = transform.parent.GetComponent <dirtPileS>(); GetComponent <Renderer>().material.mainTexture = textures[Random.Range(0, textures.Length)]; }
// Use this for initialization void Start() { innerVacuum = GameObject.Find("VacuumIC").GetComponent <Collider>(); outterVacuum = GameObject.Find("VacuumOC").GetComponent <Collider>(); myPile = transform.parent.GetComponent <dirtPileS>(); GetComponent <Renderer>().material.mainTexture = textures[Random.Range(0, textures.Length)]; }