Add in-game paint HUD bound to the mesh painter
Add a code-driven HUD that appears in paint mode and binds live to the active MeshPainter: four channel toggles, HSV pickers for albedo and emission, sliders for metallic/smoothness/occlusion, emission intensity and brush size. The HUD self-assembles its own overlay canvas and event system at runtime. Add a ModeChanged event to GameModeManager so the HUD can follow the active mode, and guard MeshPainter against painting through the UI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
6555db1487
commit
04c22f0ac1
8 files changed
+594
No files matched your search
@@ -41,6 +41,10 @@ public class GameModeManager : MonoBehaviour
|
||||
public MeshPainter Painter => painter;
|
||||
public InsectController Insect => insect;
|
||||
|
||||
/// <summary>Raised after a mode switch finishes (the new mode's Enter has already run).
|
||||
/// Argument = the now-active mode. Used by UI (e.g. the paint HUD) to follow the mode.</summary>
|
||||
public event System.Action<GameMode> ModeChanged;
|
||||
|
||||
private readonly List<GameMode> _modes = new List<GameMode>();
|
||||
private int _activeIndex = -1;
|
||||
|
||||
@@ -105,6 +109,7 @@ public class GameModeManager : MonoBehaviour
|
||||
ActiveMode.Enter();
|
||||
|
||||
Debug.Log($"[GameModeManager] Mode -> {ActiveMode.DisplayName}", this);
|
||||
ModeChanged?.Invoke(ActiveMode);
|
||||
}
|
||||
|
||||
private bool WasSwitchPressed()
|
||||
|
||||
Reference in new issue
Block a user