Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] NimGui, a 1 Draw Call Immediate Mode GUI for Unity

Discussion in 'Assets and Asset Store' started by psuong, Sep 18, 2021.

  1. psuong

    psuong

    Joined:
    Jun 11, 2014
    Posts:
    125
    Yea all RP support would be a bit diffcult, as I need to figure out how injecting passes work in HDRP.

    As for texture support, I do have an idea of using a texture array or creating an atlas on runtime, but I'll need to research and see which one is better supported
     
  2. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    73
    Another question is I have added a hash offset for each render view ( really just added current context hash offset where it calculates hash function in TextUtils and ImRect ) which seems to work great mostly ( the states become unique between views ) the only thing i can't seem to figure out is why ImGui.Slider will share its state between views
     
  3. psuong

    psuong

    Joined:
    Jun 11, 2014
    Posts:
    125
    Hmm - I wonder if I have a bit of a mismatch on how I generate IDs with sliders vs other widgets. I can take a brief look this weekend on both issues and get back to you.
     
  4. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    73
    Never mind that , I have already figured it out :)
     
    psuong likes this.
  5. psuong

    psuong

    Joined:
    Jun 11, 2014
    Posts:
    125
    What was the issue btw? I would like to push out some updates soon.
     
  6. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    73
    So instead of having per view hash offset , now i created a hash backup system that saves the UnsafeParallelHashMap into dictionary objects and restores them once the current view becomes active. Which means all the hashes are now local and there is no need to worry about accidentally having intercepting indexes. Did still need to add a hash offset per slider though,because it was not possible to have two sliders with the same label
     
    psuong likes this.
  7. psuong

    psuong

    Joined:
    Jun 11, 2014
    Posts:
    125
    Cool thanks for the heads up. It gives me some ideas to redesign the backend to support multi viewports.
     
  8. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    73
    not sure if its relevant to the default code base since i modified the code in so many places already , but one thing i noticed when doing smooth scroll of a scroll area and the mouse pointer position would intersect with a slider drag target , it would appear as if the slider would capture the mouse and stop the current scroll. I'm feeding a joystick axis input as the mouse wheel so it is a bit more smooth then a normal mouse scroll , similar to how it behaves in a browser when you hold and drag the middle mouse button.
     
  9. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    Hi, this looks really good. Just what I wanted. The only thing limiting me from potentially adopting is the lack of HDRP support. Any idea when you expect that to land?
     
    Last edited: Dec 16, 2023
  10. psuong

    psuong

    Joined:
    Jun 11, 2014
    Posts:
    125
    Yea that's been a bug I've been meaning to look into. The scrolling is very janky at the moment and I've been wanting to fix it by better capturing the scope's stack
     
  11. psuong

    psuong

    Joined:
    Jun 11, 2014
    Posts:
    125
    Yea, I've initially started HDRP, but I'm also in the process of converting everything to use structs so I can better support scopes and Burst Compiler usage. So it won't happen until after the conversion to using structs is done. I have a general idea of how to inject it, but I need to figure out how to sort the renderer feature correctly so post processing won't affect NimGui.