Class WorldSceneDetailsCacheReader
ScriptableObject responsible for reading and rebuilding world scene details from Unity scenes. Scans all configured world scenes, extracts spawn positions, boundaries, teleporters, and validates destinations against the TeleporterCache.
[CreateAssetMenu(fileName = "FishMMO World Scene Details Reader", menuName = "FishMMO/World Scene Details Reader")]
public class WorldSceneDetailsCacheReader : ScriptableObject
- Inheritance
-
ObjectScriptableObjectWorldSceneDetailsCacheReader
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.MemberwiseClone()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Fields
TeleporterCache
Reference to the TeleporterCache used to validate teleporter destination connections during rebuild.
public TeleporterCache TeleporterCache
Field Value
Methods
HarvestPointsOfInterest(Scene)
Every point of interest in one scene, as the map draws it: each active generated ScenePointOfInterest and each active hand-placed MapPointOfInterest.
public static List<MapPointOfInterestDetails> HarvestPointsOfInterest(Scene scene)
Parameters
sceneSceneThe scene to read. Only its own objects are read, never another loaded scene's.
Returns
- List<MapPointOfInterestDetails>
The details, sorted by type, name and position; never null.
Remarks
Read from the scene's roots rather than with FindObjectsByType, which spans every loaded
scene: the rebuild opens scenes additively, and a POI must never be harvested into a neighbour.
Sorted because component order in a scene is not stable across saves, and the cache is a
committed asset whose churn should mean something changed.
Rebuild(ref WorldSceneDetailsDictionary)
Scans all world scenes and rebuilds the provided scene details dictionary. Extracts spawn positions, boundaries, and teleporters from each scene. Teleporter destinations are validated against the TeleporterCache; missing destinations produce errors.
public virtual bool Rebuild(ref WorldSceneDetailsDictionary worldSceneDetailsDictionary)
Parameters
worldSceneDetailsDictionaryWorldSceneDetailsDictionaryReference to the dictionary to populate with scene details.
Returns
- bool
True if the rebuild process completes; otherwise, false.