Commit Graph

6 Commits

Author SHA1 Message Date
7a008c7e60 Fix packaged build: weak ptr timing, factory module, hard refs, brace fix
Critical fixes for packaged builds:
- Widget weak ptrs (SpawnManager/SceneSerializer) are null in packaged due to
  HUD deferred init. All button lambdas now get references fresh from
  PlayerController via GetOwningPlayer() cast instead of cached weak ptrs.
- HUD BeginPlay deferred by one tick (SetTimerForNextTick) to ensure
  PlayerController has initialized SpawnManager before wiring.

Module split:
- Factories moved to separate PS_EditorTools module (Type: Editor)
  to fix UHT error with UFactory in packaging builds.
- PS_Editor module no longer depends on UnrealEd for factories.

Asset references:
- TSoftObjectPtr/TSoftClassPtr changed to TObjectPtr/TSubclassOf for
  MasterCatalog, SpawnCatalogs, and ActorClass entries. Hard references
  ensure assets are cooked in packaged builds.

Other fixes:
- GetActorLabel() replaced with GetClass()->GetName() (editor-only API)
- Missing brace in Browse dialog BaseLevel sync code
- BaseLevel sync only when scenario specifies a LevelName (no more clearing on empty)
- Save As dialog with native Windows file picker
- Debug info in catalog UI when empty (shows chain: Master→Catalogs→Entries)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:17:52 +02:00
9c43fd523a Standalone editor: scenario workflow, BaseLevel combo, ReturnToEditor
Editor workflow:
- Removed auto-detection of BaseLevel (strip _Editor). Editor is standalone.
- User selects BaseLevel from ComboBox (populated from MasterCatalog.BaseLevels)
- "None" option for editing without a base level
- Selecting BaseLevel: clears current scenario, hides persistent level actors,
  loads sublevel. Selecting "None" restores persistent level actors.

UI terminology: Scene → Scenario (save field, buttons, notifications)

GameInstanceSubsystem:
- Renamed PendingSceneName → PendingScenarioName
- Added LastEditedScenarioName/LastEditedBaseLevel (persist after Consume)
- SetPendingScenario() stores in both Pending and LastEdited
- ReturnToEditor() restores Pending from LastEdited, opens editor map
- EditorMapName auto-saved on first Play, used by ReturnToEditor
- OpenEditor() / ReturnToEditor() callable from gameplay BP

Play button: resets input mode before OpenLevel (fixes cursor in FirstPerson GM)

Test assets: FirstPerson template for testing Play/ReturnToEditor flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 16:12:10 +02:00
7ef566f3f3 Update test level and engine config
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 12:51:13 +02:00
8b2609669f Add Phase 2 selection system and translate gizmo
- Click-to-select with raycast (Movable actors only)
- Ctrl+click for multi-select, click empty to deselect
- Click vs drag detection (pixel threshold) to avoid accidental selection
- SelectionManager owned by PlayerController with OnSelectionChanged delegate
- Custom depth stencil toggling on selected actors
- Debug bounding box visualization for selection
- Custom translate gizmo actor with colored arrows (R/G/B) and cone tips
- Gizmo renders on top of scene (SDPG_Foreground + Translucent depth test disabled)
- Constant screen-size gizmo scaling based on camera distance
- Unlit gizmo material with Color vector parameter (M_PS_Editor_Gizmo)
- r.CustomDepth=3 enabled for future outline post-process

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:06:11 +02:00
b089a20512 Add PS_Editor plugin Phase 1: GameMode + Camera navigation
Runtime editor plugin with UE viewport-style camera controls:
- ZQSD/Arrows movement (always active), E/A for up/down
- LMB: pan (horizontal move + yaw), RMB: free fly look
- Alt+LMB / MMB: orbit around focal point, scroll: zoom
- HUD with controls help, cursor auto-hide during camera ops

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:33:55 +02:00
17e8d5b194 Initial Commit 2026-04-10 11:40:15 +02:00