Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

[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:
    126
    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:
    82
    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:
    126
    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:
    82
    Never mind that , I have already figured it out :)
     
    psuong likes this.
  5. psuong

    psuong

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

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    82
    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:
    126
    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:
    82
    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:
    126
    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:
    126
    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.
     
  12. D-DutchDave

    D-DutchDave

    Joined:
    May 4, 2018
    Posts:
    40
    Hi! Considering to pick up this asset, and just wanted to double check if it is still actively supported :)

    Looks like a pretty good asset! I would be using it to create something akin to a runtime editor. uGUI is a no-go for that as I want it to be code driven, so I have been looking for alternatives. Do you think this asset would work well in the context of high numbers of widgets?
     
  13. psuong

    psuong

    Joined:
    Jun 11, 2014
    Posts:
    126

    > Considering to pick up this asset, and just wanted to double check if it is still actively supported :)

    I haven't released a new update yet. Internal one has a bunch of optimization improvements for 2022 LTS and 2023. I was holding off on the update for when I can release the new text renderer & image support, but I'll likely split that out into separate features. Updates come when I can get it in; all the source code is available so you can extend and create your own widgets. Upgrades should work easily with Unity's API upgrader.

    Upcoming patch will support ISystem and BurstCompiled calls natively on the Main Thread.

    > Do you think this asset would work well in the context of high numbers of widgets?

    Yes depending on the widgets. Some widgets are a little more expensive than others due to using managed APIs. A lot of numerical based widgets are cheap.

    New Upcoming Update moves common static APIs to be Burst Friendly on the Main Thread.
     
    Last edited: Mar 11, 2024
    niki_dev likes this.