Hi!
So want my hero to have a healthbar, a shield bar and an energy bar (not edible… hehe … sorry for that).
So i created a class in a script to capsule all the information these 3 bars have.
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace customClasses
{
[System.Serializable]
public class liquidStat : Component
{
public string name;
public float valMax; //max value
public float valCurrent; //current value
public float valReg; //regeneration per sec
private Slider slider; //UI.Slider
private Text text;
}
}
now the problems come: in order to give my hero the information i want to be able to set the variables of the class in the inspector, which isnt working.
in the inspector in the script it sais:
Health None(liquidStat) instead of a dropdown menue of all public variables.
is there away to access all the variables in the inspector ?
James Butler