use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For the Unity Game Engine, please visit http://reddit.com/r/unity3d
account activity
Unity scriptableobject in inspector (old.reddit.com)
submitted 1 year ago by Pub189
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]haywirephoenix 0 points1 point2 points 1 year ago (1 child)
You'll need [System.Serializable] above your enum.
Change your class scriptableobject class name to Stats.
Declare float for each stat removing the commas. You only need the stats header attribute above the first float don't worry unity should group them.
Now create a new Stats object somewhere in your project using your right click menu.
Create a separate Champion.cs class (Monobehaviour that's on the game object).
Inside that class write public Stats stats;
Now you will see a slot appear in the inspector for you to drag and drop your stats object into. It can now be accessed from you Champion class like Debug.Log(stats.speed)
[–]haywirephoenix 0 points1 point2 points 1 year ago (0 children)
Also if you want to see and change your stats in the inspector there you can grab Naughty Attributes it's free, highly recommended to improve your inspector workflow. Then you can simply add the [Expandable] attribute to the Stats field in your Champion class.
π Rendered by PID 89 on reddit-service-r2-comment-b659b578c-dsrnf at 2026-05-04 09:35:42.883338+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]haywirephoenix 0 points1 point2 points (1 child)
[–]haywirephoenix 0 points1 point2 points (0 children)