Answers for "how to read public verible in another script unity c#"

C#
1

how to read public verible in another script unity c#

public class Accessor : MonoBehaviour {
    void Start()
    {
        GameObject thePlayer = GameObject.Find("ThePlayer");
        PlayerScript playerScript = thePlayer.GetComponent<PlayerScript>();
        playerScript.Health -= 10.0f;
    }
}
Posted by: Guest on January-20-2021

Code answers related to "how to read public verible in another script unity c#"

C# Answers by Framework

Browse Popular Code Answers by Language