I’m am new to unity and i’m trying to select all the game objects in the scene except the camera, to change the game object color.
How could I exclude the camera from being selected ?
Here is the code I use (JS) :
#pragma strict
var h : float = 0;
var s : float = 0.8;
var v : float = 1;
function Start () { changeColor(); }
function changeColor () {
var objects : GameObject[] = FindObjectsOfType(GameObject);
while (true) {
for (var obj : GameObject in objects) {
if (h < 1)
h = h+0.005;
else
h = 0;
obj.renderer.material.color = EditorGUIUtility.HSVToRGB(h,s,v);
yield WaitForSeconds(0.1);
}
}
}