Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tutorial - Improve Your Workflow with Custom Property Drawers & UI Toolkit

Discussion in 'Community Learning & Teaching' started by ChrisKurhan, Mar 21, 2023.

  1. ChrisKurhan

    ChrisKurhan

    Joined:
    Dec 28, 2015
    Posts:
    266


    Hey all ! Happy #TutorialTuesday!

    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 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!

    ‍ As always, the full project code is available on GitHub!