Giter Site home page Giter Site logo

dearimgui-unity's Introduction

DearImGui-Unity

This repository is a Unity wrapper of the immediate mode GUI library, Dear ImGui (https://github.com/ocornut/imgui).

This repository is based on dear-imgui-unity, the main differences are:

  1. This repository follows the Dear ImGui version (should keep updating).
  2. Readapts the interface and flow.
  3. To avoid references to Unity in the wrapper, system vectors are used uniformly in ImGuiNET.

Current Dear ImGui version is 1.90.0.

Usage

  1. Download repository code.
  2. Take out folder ImGuiUnity to your project. If your project doesn't have System.Runtime.CompilerServices.Unsafe, you can find it in Assets/Scripts/Plugins.
  3. When using 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.
  4. Subscribe to the ImGuiUnity.Layout event and use ImGui functions.
  5. Example script:
    using ImGuiNET;
    using ImGuiNET.Unity;
    using UnityEngine;
    
    public class ImguiTest : MonoBehaviour {
        private void OnEnable() {
            ImGuiUnity.Layout += OnLayout;
        }
     
        private void OnDisable() {
            ImGuiUnity.Layout -= OnLayout;
        }
        
        private void OnLayout() {
            ImGui.ShowDemoWindow();
        }
    }

See Also

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

TODO

  1. [Done] Fix and clean up the current version (1.75.0) of the code.
  2. [Done] Upgrade Dear ImGui version to 1.90.0, readapts the interface and flow.
  3. Extraction an UPM package, update README.
  4. Android, iOS support.
  5. More keyboard event confirm.
  6. Complete HDRP test.

dearimgui-unity's People

Contributors

vieqqedf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.