Why does my start function not work?
I want to create health to a game object. When i write in the start function:
using UnityEngine;
using System.Collections;
public class healthally : MonoBehaviour {
public float allystartingHealth = 100f;
public float allycurrentHealth;
void start()
{
allycurrentHealth = allystartingHealth;
}
}
It won't set the Health to 100 while starting
When i set it in the Update function though, it works (but not usefull for me)
Easiest code, but i don't get it why...?
Comment
Best Answer
Answer by gjf · Dec 18, 2015 at 09:00 PM
Start()
not start()
... looks like a small difference, but isn't ;)
By the way, gif, please publish or reject questions like these after you've already answered them. I'm running through the moderation queue and seeing that you have answered pretty much 1/5 of the questions already.