when using “C# Instantiate”, to re-spawn an enemy bot, how do i make the health of that re-spawned bot to be equal to what I set for “public int health = 18;” in the Inspector ?
currently at the end of my Instantiate line of code i have something like this… “gi.GetComponent().health = 18;” but that forces the bot to have 18 health, not exactly what is set in the “public int health = 18” (if i change it in the inspector)
is there something I can put in place of 18 in my Instantiate Line of Code such as .health = (same as int) ??