// Use this for initialization void Start() { if (!ObjectPaletteToUse) { ColorPickerToUse = ColorPicker.GetComponent <ColorPickerUnityUI>(); if (!ColorPickerToUse) { Debug.LogError("The color picker object assigned to '" + gameObject.name + "' does not have the 'ColorPickerUnityUI' component."); } } if (gameObject.GetComponent <Camera> ()) { isCamera = true; } else { isCamera = false; } if (gameObject.GetComponent <Light> ()) { isLight = true; } else { isLight = false; } }
void Start() { gameObject.GetComponent <Renderer>().materials[MaterialIndex].color = color; if (!ObjectPaletteToUse) { ColorPickerToUse = GameObject.Find("BodyColorPicker").GetComponent <ColorPickerUnityUI>(); } if (gameObject.GetComponent <Camera> ()) { isCamera = true; } else { isCamera = false; } if (gameObject.GetComponent <Light> ()) { isLight = true; } else { isLight = false; } }