Better navmesh, Added icons, Added PSXPlayer component

This commit is contained in:
2025-04-07 17:47:48 +02:00
parent 9037937d3c
commit 93c50866f8
12 changed files with 434 additions and 24 deletions

View File

@@ -0,0 +1,31 @@
using UnityEngine;
using UnityEditor;
using SplashEdit.RuntimeCode;
using System.Linq;
namespace SplashEdit.EditorCode
{
[CustomEditor(typeof(PSXNavMesh))]
public class PSXNavMeshEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
PSXNavMesh comp = (PSXNavMesh)target;
if (GUILayout.Button("Create preview"))
{
PSXSceneExporter exporter = FindObjectsByType<PSXSceneExporter>(FindObjectsSortMode.None).FirstOrDefault();
if(exporter != null)
{
comp.CreateNavmesh(exporter.GTEScaling);
}
else
{
Debug.LogError("No PSXSceneExporter found in the scene. We can't pull the GTE scaling from the exporter.");
}
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9d3bd83aac4c3ce9ab1698a6a2bc735d