I need to implement a setting page where the player can select the color of his choice and then use this on the gameobject.
public GameObject object1;
public GameObject object2;
public GameObject object3;
public GameObject object4;
public GameObject object5;
public GameObject object6;
public GameObject object7;
public GameObject object8;
public GameObject object9;
// Use this for initialization
void Start () {
object1.renderer.material.color = new Color (0.5f,0.5f,0.5f);
// object1.renderer.material.color.r = 100;
// object1.renderer.material.color.r = 100;
}
// Update is called once per frame
void Update () {
}
How can i generate the variables for color red ? i dont see any method which accepts three values for RGB from 0 to 255 ?
moreover what is the best or suitable way to pass the color information of color from one scene to another like saving the information from playerprefs and using it retrieving it from scene ?
atleast if i am able to get the numeric values of color then i can write some code to use it and change the color in next scene because the Playerprefs(setint) will do it for me.