Improve Your Workflow with Custom Property Drawers & UI Toolkit | Unity Tutorial




Something a lot of newer developers don’t spend any time on is improving their workflow. Learn how you can write custom property drawers in UI Toolkit to improve your workflow when dealing with complex object relationships in the Editor!

Featuring @samyam ‘s « Who Me! » 😀

UI Toolkit is the new UI system that takes a lot of guidance from web-based development. It’s the recommended UI System to use starting with Unity 2022 for editor scripting! With the upcoming LTS release of Unity 2022, this is a great time to start learning this new system.

In the Gun Scriptable Object Series – https://www.youtube.com/watch?v=E-vIMamyORg&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to we’ve already created a Gun Scriptable Object that has references to several other Scriptable Objects. That is a great separation of concerns, but in the Unity Editor it’s a big pain to deal with these configurations. In this video I show you the implementation for a custom property drawer for the Shoot Config that allows us to easily create Scriptable Objects and edit the configuration for the Shoot Config, all within the Gun Scriptable Object inspector. This saves a lot of time and makes it much more clear what the configuration of a particular gun is!

🔎 Looking for the Odin Inspector? https://assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041?aid=1101l9QvC

💸 Ongoing sales 💸
⚫ Synty Humble Bundle: https://www.humblebundle.com/software/syntys-polygon-game-dev-assets-bundle-3-software?partner=llamasoftware&charity=2280172
⚫ Epic Royalty Free Music Collection Humble Bundle: https://www.humblebundle.com/software/epic-royaltyfree-music-collection-software?partner=llamasoftware&charity=2280172
⚫ gim.studio Publisher Sale! 50% OFF gim.studio Assets! https://assetstore.unity.com/publisher-sale?aid=1101l9QvC
⚫ FREE Animated Spider Model from gim.studio with Promo Code : https://assetstore.unity.com/packages/3d/characters/animals/animalia-spider-52710?aid=1101l9QvC
⚫ See all active asset sales on the Asset Store: https://assetstore.unity.com/?on_sale=true&orderBy=0&rows=96&clickref=1100lwtudvMJ&utm_source=partnerize&utm_medium=affiliate&utm_campaign=unity_affiliate&aid=1101l9QvC
⚫ Save 25% off your first Asset Store Order: https://prf.hn/click/camref:1101l9QvC/creativeref:1011l78340
⚫ Save up to 50% on NEW Assets: https://assetstore.unity.com/?new_sale=true&orderBy=1&aid=1101l9QvC

👨‍💻 As always, all code from this video is available on GitHub: https://github.com/llamacademy/scriptable-object-based-guns/tree/ui-toolkit-editor

📚 Resources:
⚫ UI Toolkit – https://docs.unity3d.com/2022.2/Documentation/Manual/UIElements.html
⚫ UI Toolkit Custom Inspector – https://docs.unity3d.com/2022.2/Documentation/Manual/UIE-HowTo-CreateCustomInspector.html
⚫ Serialized Objects – https://docs.unity3d.com/ScriptReference/SerializedObject.html
⚫ Serialized Properties – https://docs.unity3d.com/ScriptReference/SerializedProperty.html
⚫ Property Drawer – https://docs.unity3d.com/ScriptReference/PropertyDrawer.html
⚫ USS – https://docs.unity3d.com/2022.2/Documentation/Manual/UIE-USS.html
⚫ Visual Element – https://docs.unity3d.com/ScriptReference/UIElements.VisualElement.html

❤ Believe in LlamAcademy’s mission and have received value from the videos? Become a Patreon Supporter or YouTube Member:
⚫ Patreon: https://www.patreon.com/llamacademy
⚫ YouTube Member: https://www.youtube.com/channel/UCnWm6pMD38R1E2vCAByGb6w/join or click the Join button on any video

📱 Let’s stay connected
YouTube: https://youtube.com/c/LlamAcademy
Patreon: https://www.patreon.com/llamacademy
Facebook: https://facebook.com/LlamAcademyOfficial
Twitter: https://twitter.com/TheLlamAcademy
TikTok: https://tiktok.com/@LlamAcademy
Instagram: https://instagram.com/LlamAcademy

—-
Most tutorials come from knowledge gained making https://survival.llama.software Llama Survival – a top-down zombie survival shooter for Android and iOS.
I also have some Unity Assets: https://assetstore.unity.com/publishers/22409?_aid=1101l9QvC
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.

#unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment

Chapters:
00:00 Why Custom Inspectors
03:12 Property Drawers
04:24 Important Editor Information
04:50 Provided Control Types
05:19 What We’re Going to Look At
05:52 The Custom Property Drawer
14:19 Closing Thoughts & Support LlamAcademy

Voir sur youtube

KA2Studio
Logo
Compare items
  • Total (0)
Compare
0