Search Unity

[Tutorial] Create an item management editor window with UI Toolkit

Discussion in 'UI Toolkit' started by Yecats, Jul 27, 2021.

  1. Yecats

    Yecats

    Joined:
    Jul 13, 2014
    Posts:
    69

    Custom tooling is incredibly helpful for streamlining the development of any game. In times past I’ve created tools for quick access for managing the state of the game (cheats) and for debugging the AI. Most recently, I’ve needed to create a custom tool for managing the item database and inventories for characters in my time travel game. A custom screen for managing scriptable object assets can be very handy, especially if you want to require certain actions or add custom validation.

    This tutorial will cover the fundamentals of creating a custom editor tool, including what scriptable objects are and how to create, delete and bind to one. You will also learn about ListView and the Object Picker.

    upload_2021-7-27_6-25-42.png

    Learning Outcomes
    1. How to open a window via the Unity toolbar.
    2. What a scriptable object is and how you can create, delete and bind to it in code.
    3. How to create and configure a ListView and ObjectPicker.
    Prerequisites
    1. Basic knowledge of UI Toolkit and UI Builder. Check out Create a runtime inventory UI with UI Toolkit if you need a primer.
    2. You need Unity 2020.3.0f1 (LTS) or later to follow along with this tutorial.
    3. This tutorial assumes you already have basic knowledge of Unity and intermediate knowledge of C#.
    Note: Tutorials may work with earlier versions. The version referenced is the on I used.

     

    Attached Files:

    Last edited: Oct 13, 2023
    loptrinho, LuisEGV, SSSekhon and 3 others like this.
  2. sebastiend-unity

    sebastiend-unity

    Unity Technologies

    Joined:
    Nov 9, 2015
    Posts:
    184
    Thank you for sharing!
     
    Yecats likes this.