From 541917d431664f8c3094a69a15721e710966c378 Mon Sep 17 00:00:00 2001 From: Patrick Dawson Date: Sat, 27 Apr 2024 19:23:22 +0200 Subject: [PATCH] update readme --- README.md | 16 +++++++++++++--- addons/imgui-godot/ImGuiGodot/ImGuiSync.cs | 4 +++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6a531996..92910fe7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Dear ImGui plugin for Godot 4 (C#) +# Dear ImGui plugin for Godot 4 ![](https://img.shields.io/static/v1?label=Godot&message=4.2&color=blue&logo=godotengine) @@ -37,11 +37,19 @@ Download (If you prefer to manually edit the .csproj instead, refer to the demo csproj for the necessary modifications.) +> [!IMPORTANT] +> If you are using the GDExtension package, you must use a version of ImGui.NET which matches the version that the GDExtension was built with. + 4. Back in the Godot editor, click `Build`. 5. Enable the plugin in `Project > Project Settings > Plugins`. -6. Write code! +## Getting Started (GDScript) + +1. [Install the plugin](https://docs.godotengine.org/en/stable/tutorials/plugins/editor/installing_plugins.html) by copying over the `addons` folder from the full package which includes +the GDExtension. + +2. Enable the plugin in `Project > Project Settings > Plugins`. ## Usage @@ -57,7 +65,9 @@ ImGuiGD.Connect(OnImGuiLayout); ### Configuration -If you want to customize fonts or other settings, create an `ImGuiConfig` resource, then open the scene `res://addons/imgui-godot/ImGuiLayer.tscn` and set its `Config` property. +If you want to customize fonts or other settings, create an `ImGuiConfig` resource, then open the +scene `res://addons/imgui-godot/Config.tscn`, select the `Config` node, and set its `Config` +property. ### Widgets diff --git a/addons/imgui-godot/ImGuiGodot/ImGuiSync.cs b/addons/imgui-godot/ImGuiGodot/ImGuiSync.cs index c94ea1a9..4c26f0f0 100644 --- a/addons/imgui-godot/ImGuiGodot/ImGuiSync.cs +++ b/addons/imgui-godot/ImGuiGodot/ImGuiSync.cs @@ -22,7 +22,9 @@ public static void SyncPtrs() ); if (ptrs.Length != 3) - return; + { + throw new NotSupportedException("ImGui version mismatch"); + } checked {