Skip to content

viliwonka/dear-imgui-unity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dear ImGui for Unity, dockable version

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

Usage

  • Add package from git URL: https://github.com/viliwonka/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.
  • 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();
        }
    }

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

Unity package for Dear ImGui, with docking support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.5%
  • Other 0.5%