Search Unity

How would I create an EditorWindow similar to AnimationController?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Supremacy037, Aug 10, 2014.

  1. Supremacy037

    Supremacy037

    Joined:
    Aug 10, 2014
    Posts:
    2
    Hello, first thread. I tried Googling for tutorials but haven't been able to find a whole lot when it comes to writing custom editors and windows beyond what's in the Unity documentation, which covers some basics but not exactly what I'm looking for.

    I'm trying to write a dialogue manager, but I want the window UI similar to how the AnimationController looks - with a Grid like background, where each different branch of the dialogue tree has a box.

    So I want to be able to create a new Dialogue Tree, which will show up in the same vein as the "Pixelman" and "Pixelman_Walk" objects in the AnimationController. Then create links between them which would show up as arrows.

    Is this kind of thing available using the GUI commands, or would i need to create/use custom textures to get this kind of thing accomplished?

    Thanks in advance!
     

    Attached Files:

  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Check out this forum post by one of the UT devs, complete with source code.

    If you have the Dialogue System for Unity, you can dig into the source for another example that might be closer to what you're describing. It's in Scripts/Core/Editor/Dialogue Editor/Conversation Node Editor/. I just drew the grid and arrows with GL methods.

     
    Veljo_Hagu and Supremacy037 like this.
  3. Supremacy037

    Supremacy037

    Joined:
    Aug 10, 2014
    Posts:
    2

    Dialogue System for Unity is almost exactly what I am trying to do. Now I just need to figure out what is worth more, $65 or hours and hours of pain and frustration trying to emulate a finished and proven product...

    Thanks a bunch!!
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Happy to help!
     
  5. Cassos

    Cassos

    Joined:
    May 20, 2018
    Posts:
    16
    Soooooo... It's 2020... Were you able to find out some stuff? ^^
     
  6. Long2904

    Long2904

    Joined:
    May 13, 2019
    Posts:
    81
    @TonyLi I also used GL to draw the arrow but it didn't work correctly. Can you check this post? For some reason, my arrow's y coordinate was not correct.
     
  7. ramofojabuka

    ramofojabuka

    Joined:
    Dec 10, 2018
    Posts:
    3