Question: C# and Unity: How would I pass a color from one scene to another? This would be using a dropdown. Example Code: Script1.cs: (In Scene1)
C# and Unity:
How would I pass a color from one scene to another? This would be using a dropdown.
Example Code:
Script1.cs: (In Scene1)
public class Script1.cs : Monobehaviour {
public void ColorChoice() {
public Dropdown colorOfBall;
public Text ColorTxt;
public static string UpdateColor;
switch (colorOfBall.value) {
case 1:
ColorTxt.text = colorOfBall.options[1].text;
Player.GetComponent
UpdateColor = ColorTxt.text;
break;
}
}
}
Script2.cs: (In Scene2)
public class UpdateColor : MonoBehaviour {
string ColorPass = Settings.UpdateColor;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
