Search Unity

Custom Editor for GUI

Discussion in 'Editor Workflows' started by Fostep, Feb 11, 2023.

  1. Fostep

    Fostep

    Joined:
    Aug 1, 2020
    Posts:
    1
    Hello everyone,

    As a game student I'm creating games, recently i add this idea to have a kind of script with buttons that allows me to add GUI objects by just using buttons and then to be able to change some properties on them.

    Here is my idea :
    - Have a canvas with a CustomEditor
    - This CustomEditor allows me to add 3 kinds of UI (in my mind so far) :
    - Linear Object Bar (like HealthBar) that can shrink with it's own functions (already done)
    - Radial Object Bar (same as the 1st but radial and can choose max and min of fillAmount)
    - Round Object bar (same as the 1st but the image is round)

    Maybe there is a simple solution about it but I'm kind of lost right now.

    I have no issues at looking at the Unity API but I'm missing the logic because the CustomEditor is new to me.

    I'm open to any suggestions, i don't have a proper code to share sorry