feat: Disable IMGUI rendering in GregPlacementController and GregWallPlacementController
gregCore CI / build (push) Has been cancelled

This commit is contained in:
Marvin
2026-04-24 17:57:19 +02:00
parent 07bc596c77
commit 3595b3e40b
3 changed files with 2 additions and 40 deletions
Binary file not shown.
@@ -121,30 +121,7 @@ namespace greg.GridPlacement
public void OnGUI()
{
if (!BuildModeActive || !_grid.ShowGridLines) return;
// Note: GL lines must be drawn from OnRenderObject or OnPostRender, but prompt specifies OnGUI.
// In Unity, GL lines in OnGUI are drawn in screen space usually unless using GL.PushMatrix/LoadPixelMatrix properly or Camera.main setup.
// The prompt says "GL.Lines in OnGUI (nicht OnRenderObject — IL2CPP-safe)".
if (Event.current.type == EventType.Repaint)
{
CreateLineMaterial();
_gridMaterial?.SetPass(0);
// Due to standard limitation, GL drawing in world space during OnGUI is problematic without setting projection matrix to camera.
// Assuming Camera.main setup is handled or pseudo-rendering here:
/*
GL.PushMatrix();
GL.LoadProjectionMatrix(Camera.main.projectionMatrix);
GL.modelview = Camera.main.worldToCameraMatrix;
GL.Begin(GL.LINES);
GL.Color(new Color(0.75f, 0.99f, 0.97f, 0.2f));
// Draw grid
GL.End();
GL.PopMatrix();
*/
}
// IMGUI disabled
}
}
}
@@ -51,22 +51,7 @@ namespace greg.WallRack
public void OnGUI()
{
if (!wallBuildModeActive && !showGridOverlay) return;
foreach (var grid in GregWallRegistry.Instance.GetAllGrids())
{
if (showGridOverlay)
{
grid.DrawDebugGrid();
}
// If wallBuildModeActive, draw slot highlights
if (wallBuildModeActive && grid == targetGrid && hoveredSlot != null)
{
// Draw highlight
// Vector3 wPos = grid.SlotToWorldPos(hoveredSlot.coord);
}
}
// IMGUI disabled
}
public void TryMount(Vector3 worldPos)