Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

so later it gives me an error that health does not exist in the current context even though its a float, how to fix?

$
0
0
using UnityEngine; public class Target : MonoBehaviour { public float health = 50f; public void TakeDamage ( float amount); { health -= amount; if(health >= 0f) { Die(); } } void Die () { Destroy (gameObject) } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>