using UnityEngine; using OctoCore.Navigation.Data; namespace OctoCore.Navigation { /// /// Scene trigger component. /// Links OctoWorldEvent to the scene loading system. /// Call LoadScene() from OctoWorldEvent to load a scene. /// public class OctoSceneTrigger : MonoBehaviour { [SerializeField, Tooltip("Scene data to load")] private OctoSceneData _sceneData; /// /// Load the configured scene. /// This method should be called from OctoWorldEvent. /// public void LoadScene() { if (!OctoCore.Instance) { Debug.LogError("[OctoSceneTrigger] OctoCore instance not found"); return; } if (_sceneData == null) { Debug.LogError("[OctoSceneTrigger] SceneData is null"); return; } OctoCore.Instance.Navigation.LoadScene(_sceneData); } } }