Skip to content

Fork of "realgamessoftware/dear-imgui-unity" with URP and Unity 2021.3 LTS support.

License

Notifications You must be signed in to change notification settings

vlandemart/dear-imgui-unity-update

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dear ImGui for Unity

This repository is fork with URP and Unity 2021.3 LTS support

UPM package for the immediate mode GUI library, Dear ImGui (https://github.com/ocornut/imgui).

Usage

  • Add package from git URL: https://github.com/vlandemart/dear-imgui-unity.git .
  • Add a DearImGui component to one of the objects in the scene.
  • When using the Universal Render Pipeline, add a Render Im Gui Feature render feature to the renderer asset. Assign it to the render feature field of the DearImGui component.
  • When using the High Definition Render Pipeline, add a custom render pass and select "DearImGuiPass" injected after post processing.
  • Subscribe to the ImGuiUn.Layout event and use ImGui functions.
  • Example script:
    using UnityEngine;
    using ImGuiNET;
    
    public class DearImGuiDemo : MonoBehaviour
    {
        void OnEnable()
        {
            ImGuiUn.Layout += OnLayout;
        }
    
        void OnDisable()
        {
            ImGuiUn.Layout -= OnLayout;
        }
    
        void OnLayout()
        {
            ImGui.ShowDemoWindow();
        }
    }

Known Issues

  • Alpha blending is incorrect when using HDRP. Still need to investigate why, it seems like the closer to 50% alpha you get the more opaque an object appears.
  • Procedural rendering is not yet supported on HDRP.

See Also

This package uses Dear ImGui C bindings by cimgui and the C# wrapper by ImGui.NET.

The development project for the package can be found at https://github.com/realgamessoftware/dear-imgui-unity-dev .

About

Fork of "realgamessoftware/dear-imgui-unity" with URP and Unity 2021.3 LTS support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.2%
  • Other 0.8%