reference to another script unity
SomeScript script = GetComponent<SomeScript>();
// alternatively, just make it a field:
[SerializeField] protected SomeScript script;
reference to another script unity
SomeScript script = GetComponent<SomeScript>();
// alternatively, just make it a field:
[SerializeField] protected SomeScript script;
how to have referecne to script in unity
private GameObject player;
player.GetComponent<PlayerMovement>().enabled = false;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us