Answers for "c# access variable from another file"

C#
1

how to get a variable from another script c#

GameObject Button = GameObject.Find("Button");
button button = Button.GetComponent<button>();
//  ^ Name of script                 ^ Also name of script
button.Pressed = true
Posted by: Guest on June-22-2021

Code answers related to "c# access variable from another file"

C# Answers by Framework

Browse Popular Code Answers by Language