- Home /
Customize script // swicth color, geometry (prefab), change child of prefab?
i have problem with this script help please i'm testing but always have wrond , the change color ir rigth but i can't change prefabas (Geometry) and prefabs child prefabs (details) this the menu strute:
Customize Menu
[<<] [Geometry] [>>]
[<<] [ color ] [>>]
[<<] [ Details] [>>]
 /* Menu */
var btn_Colors=[Color.blue,Color.red,Color.yellow,Color.green,Color.white,Color.black]; var btn_Count:int;
function OnGUI () { // Make a background box GUI.Box (Rect (10,10,180,220), "Customize Menu");
 // Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
 if (GUI.Button (Rect (60,40,80,20), "Geometria")) {
     
 }
 //Directional buttons
 if (GUI.Button (Rect (20,40,30,20), "<<")) {
     //script ?
 if (GUI.Button (Rect (150,40,30,20), ">>")) {
     //script ?
 }
 // Make the second button.
 if (GUI.Button (Rect (60,70,80,20), "Color")) {
     
 }
 //Directional buttons
 if (GUI.Button (Rect (150,70,30,20), ">>"))
 btn_Count++;
 if (GUI.Button (Rect (20,70,30,20), "<<"))
 btn_Count--;
 if(btn_Count==btn_Colors.length)
 btn_Count=0;
 else if(btn_Count==-1)
 btn_Count=btn_Colors.length-1;
 gameObject.Find("figuras").renderer.material.color = btn_Colors[btn_Count];
// Make the third button. if (GUI.Button (Rect (60,100,80,20), "Detalles")) {
 }
 //Directional buttons
 if (GUI.Button (Rect (20,100,30,20), "<<")) {
     //script
 }
 if (GUI.Button (Rect (150,100,30,20), ">>")) {
     //script
 }
 //Forth Button
 if (GUI.Button (Rect (20,140,160,20), "Save Configuration")) {
     //script
 }
 //Fith Button
 if (GUI.Button (Rect (20,170,160,20), "Load Configuration")) {
     //script
 }
 //Six Button
 if (GUI.Button (Rect (20,200,160,20), "Start Game")) {
     //script
 }
 }
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                