Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Start () {
- playerObj = GameObject.Find("/Player");
- if(playerObj) {
- playerHealth = playerObj.GetComponent(Health);
- } else {
- Debug.Log("Couldn't find '/Player'");
- // Then do something here to cope, delete it, stop the game, cry, whatever.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement