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…?