Broken RUntime

This commit is contained in:
Jan Racek
2026-03-27 13:47:18 +01:00
parent 6bf74fa929
commit d29ef569b3
16 changed files with 1168 additions and 1371 deletions

View File

@@ -9,6 +9,11 @@ using UnityEngine;
namespace SplashEdit.RuntimeCode
{
public enum PSXSceneType
{
Exterior = 0,
Interior = 1
}
[ExecuteInEditMode]
public class PSXSceneExporter : MonoBehaviour
@@ -35,7 +40,7 @@ namespace SplashEdit.RuntimeCode
[Header("Scene Type")]
[Tooltip("Exterior uses BVH frustum culling. Interior uses room/portal occlusion.")]
public int SceneType = 0; // 0=exterior, 1=interior
public PSXSceneType SceneType = PSXSceneType.Exterior;
[Header("Cutscenes")]
[Tooltip("Cutscene clips to include in this scene's splashpack. Only these will be exported.")]
@@ -166,7 +171,7 @@ namespace SplashEdit.RuntimeCode
// Collect them early so both systems use the same room indices.
PSXRoom[] rooms = null;
PSXPortalLink[] portalLinks = null;
if (SceneType == 1)
if (SceneType == PSXSceneType.Interior)
{
rooms = FindObjectsByType<PSXRoom>(FindObjectsSortMode.None);
portalLinks = FindObjectsByType<PSXPortalLink>(FindObjectsSortMode.None);
@@ -194,7 +199,7 @@ namespace SplashEdit.RuntimeCode
// Phase 5: Build room/portal system (for interior scenes)
_roomBuilder = new PSXRoomBuilder();
if (SceneType == 1)
if (SceneType == PSXSceneType.Interior)
{
if (rooms != null && rooms.Length > 0)
{