Quantcast
Channel: Answers for "Public boolean can't be accessed due to its protection level."
Viewing all articles
Browse latest Browse all 4

Answer by drume3D

$
0
0
I would do this: using UnityEngine; using System.Collections; public class PlayerHealth : MonoBehaviour { public static PlayerHealth current; public bool isDead; void Start () { current = this; } } You can now access isDead wherever you like calling: PlayerHealth.current.isDead Also, current can say whatever you want it to say :)

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images