Skip to content

fix: SpaceSys sidebar button and apartment viewport setup - #15

Merged
ULookup merged 6 commits into
mainfrom
merge/pr-14-devil-anim-space-sys
May 29, 2026
Merged

fix: SpaceSys sidebar button and apartment viewport setup#15
ULookup merged 6 commits into
mainfrom
merge/pr-14-devil-anim-space-sys

Conversation

@ULookup

@ULookup ULookup commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

This PR merges the integrated work from PR #14 (恶魔动画资源 + 空间系统代码) with scene-level fixes for the Apartment_Main.unity:

  • Fix _tabSpaceSys null reference on SidebarController that prevented the SpaceSys panel from opening
  • Configure ApartmentViewportCamera with orthographic projection and RenderTexture binding
  • Add ApartmentViewportImage (RawImage) displaying the viewport RenderTexture
  • Wire up ApartmentViewportInputBridge for routing viewport clicks to world-space interaction

Root Cause

The _tabSpaceSys field on the SidebarController component (on the Sidebar child object) was set to {fileID: 0} (null). The SidebarController's null check if (_tabSpaceSys is not null) skipped registering the click listener, so the button had no effect.

Changes

File Change
Apartment_Main.unity +251 lines: viewport system + _tabSpaceSys fix

Test Plan

  • Enter Play mode, navigate to Apartment scene
  • Click the SpaceSys sidebar tab — panel should open
  • Click the Close button on the panel — panel should close
  • Verify viewport renders the apartment scene correctly
  • Click on the viewport — pet click reactions should work

habhab783124-lab and others added 6 commits May 25, 2026 10:42
冲突处理:
- StubPanelBase.cs → 取 PR 的 ResolveOrCreateRouter() 方案
- TarotPanelStub.cs → 保留 main(PR 版本较旧,缺少历史记录功能)
- Apartment_Main.unity → 保留 main(场景 YAML 冲突过多,需编辑器重建)
- .asmdef → 合并两边引用(Tarot + HubUI)

导入内容:
- 恶魔动画:PlayingMusic / Write anim + Pet_Devil.controller 更新
- 恶魔精灵图:玩掌机 + 画画 序列帧(~68 PNG)
- 空间系统代码:ApartmentViewportInputBridge / BuildModeController / PetClickReactionController / PetPlayerFurnitureInteractionController
- SidebarController 新增 SpaceSys 标签页
- 删除旧 SpaceSystemPrototypeView.cs
- MCP skills 同步、RenderTexture 资源、Prefab 目录等
- Fix _tabSpaceSys null reference on SidebarController that prevented
  the SpaceSys panel from opening when the sidebar button was clicked
- Add ApartmentViewportCamera with orthographic projection targeting
  the ApartmentViewport_RT RenderTexture
- Add ApartmentViewportImage (RawImage) bound to the RenderTexture
- Add ApartmentViewportInputBridge for routing viewport clicks to
  world-space interaction (pet click, furniture, build mode)
@ULookup
ULookup merged commit 3947c23 into main May 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants