Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Runtime/Scripts/Controls/ImWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ public static bool BeginWindow(this ImGui gui, string title, ref bool open, ImSi
{
var rect = GetInitialWindowRect(gui, size);

return BeginWindow(gui, title, ref open, rect, flags);
return BeginWindow(gui, title, ref open, ref rect, flags);
}

public static void BeginWindow(this ImGui gui, string title, ImRect rect, ImWindowFlag flags = ImWindowFlag.None)
public static void BeginWindow(this ImGui gui, string title, ref ImRect rect, ImWindowFlag flags = ImWindowFlag.None)
{
var open = true;
BeginWindow(gui, title, ref open, rect, flags | ImWindowFlag.NoCloseButton);
BeginWindow(gui, title, ref open, ref rect, flags | ImWindowFlag.NoCloseButton);
}

public static bool BeginWindow(this ImGui gui, string title, ref bool open, ImRect rect, ImWindowFlag flags = ImWindowFlag.None)
public static bool BeginWindow(this ImGui gui, string title, ref bool open, ref ImRect rect, ImWindowFlag flags = ImWindowFlag.None)
{
if (!open)
{
Expand Down Expand Up @@ -81,6 +81,8 @@ public static bool BeginWindow(this ImGui gui, string title, ref bool open, ImRe
gui.Layout.Push(ImAxis.Vertical, contentRect);
gui.BeginScrollable();

rect = state.Rect;

return true;
}

Expand Down
3 changes: 2 additions & 1 deletion Runtime/Scripts/IO/UGUI/ImuiUnityGUIBackend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ protected override void Awake()
}
}

scheduler ??= GraphicsSettings.currentRenderPipeline ? new ImuiScriptableRenderingScheduler() : new ImuiBuiltinRenderingScheduler();
useGUILayout = false;
}

Expand All @@ -122,6 +121,8 @@ protected override void OnEnable()
{
base.OnEnable();

scheduler ??= GraphicsSettings.currentRenderPipeline ? new ImuiScriptableRenderingScheduler() : new ImuiBuiltinRenderingScheduler();

if (ClearTexture == null)
{
ClearTexture = new Texture2D(1, 1, TextureFormat.RGBA32, false);
Expand Down