Hey
ive seen a few YouTube videos using custom classes
my code get a bit messy some times and i would like to neaten it up
ive been looking on the forums and answers for how to use custom classes
i got so far then got stuck
the problem im having is that i get my class (Ship) to show up in the inspector but there is no drop down menu with my variables in it. How do i fix it?
also for some reason i get errors if my variables in side my class arnt static
public class Vessel_Movement : MonoBehaviour {
[System.Serializable]
public class Ship_Stats
{
public static float Maneuverability = 10f;
public static float MaxSpeed = 10f;
public static float Acceleration = 100f;
}
public Ship_Stats Ship;
public float tempNum;
void Update()
{
tempNum = Ship_Stats.MaxSpeed;
}
}