Greetings
Instead of using int values to track if my car is steering left or right (and remembering which one is which) I thought of using an enum with those values.
[Serializable]
public enum SteerDirection
{
Left = -1,
Right = 1,
None = 0
}
However when I try to associate my Steer(SteerDirection value) on the inspector, this does not show up. I tried adding the serializable tag, or updating some of the references in the Car.cs class.
I was wondering if anyone had a similar experience, or if there’s any arguments against this approach. On regular non-engine programming it is recommended to avoid “magic numbers” so that was my attempted approach here.
Note: Tagging as talk, as it’s more for discussion than a direct quesion. I can continue the lesson using magic numbers