May 2018
Beginner
492 pages
11h 53m
English
In this example, our object will just have one variable, for the current button action. We'll say the button can have one of three possible values: PressedDown, ReleasedUp, or None. We'll define the action as having occurred current during the current Update, then it's cleared to None. That is, rather than record the current button state (for example, is pressed), we are capturing the current button action (was just pressed), to be consistent with other examples in this chapter.
It's useful to keep scriptable objects in their own folder in the Project Assets:
Read now
Unlock full access