Property Attributes - Part 1 | Unity Editor Scripting
Otter Knight
This video is the first of many that focus on property drawers and how to make them. Property drawers are used to change how variables are displayed in the inspector in Unity, which is awesome. You should start with this video, as the coming ones expect you to have watched the previous ones.
This and the next two videos focus on making our own attributes in Unity (known as property attributes) and then making property drawers to display them the way we want. Today we start with an introductory example where we make a property attribute that you can assign to floats, which then lets you randomize their value with a button in the inspector. I call it RandomizeAttribute. It introduces the basic concepts you need to understand to begin your own experimentation. Happy coding!
When you get more advanced at Unity and want development to be both faster and smoother, it’s time to look into Editor Scripting. Learning about concepts like attributes, property drawers, custom editor windows, custom inspectors, and scripts running in the editor can open a whole new world in game development. Learning about these topics can seem daunting and like it requires you to already have a good understanding of many other advanced concepts. This series will take you from being a beginner at editor scripting to having the ability to create your own level editors.
Unity Manual Page: https://docs.unity3d.com/Manual/edito...
····················································································
Timestamps: 0:00 Introduction 1:12 Property Attribute 3:12 Property Drawer 11:23 Outro
····················································································
Discord Server: https://discord.gg/NsCvyHYWwq Twitter: https://twitter.com/otter_knight
····················································································
End music: Track: JJD - Adventure [NCS Release] Music provided by NoCopyrightSounds. Watch: https://www.youtube.com/watch?v=f2xGx... Free Download / Stream: http://ncs.io/adventure
115806252 Bytes