- using UnityEngine;
- using System.Collections;
- public class HaloObj : MonoBehaviour {
- public void SetColor(Color color)
- {
- Renderer[] renderArr = GetComponentsInChildren<Renderer>();
- for(int i=0; i<renderArr.Length; i++)
- {
- renderArr[i].material.color = color;
- }
- }
- }
|