Class SceneBiomeMap
Which biome lies where in a scene, baked when the world was generated: a grid of BiomeTemplate IDs over a rectangle of world space. Imported from the biome-map cells WorldEditor exports, or painted by any other tool; both the server and the client read it, so it holds IDs rather than a texture.
[CreateAssetMenu(fileName = "New Scene Biome Map", menuName = "FishMMO/Biomes/Scene Biome Map", order = 3)]
public class SceneBiomeMap : CachedScriptableObject<SceneBiomeMap>, ICachedObject
- Inheritance
-
ObjectScriptableObjectSceneBiomeMap
- Implements
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()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
BiomeIDs
[Tooltip("BiomeTemplate cached-object IDs, row-major from the south-west corner; 0 = no biome.")]
[HideInInspector]
public int[] BiomeIDs
Field Value
- int[]
Height
[Tooltip("Grid rows (world Z).")]
[Min(1)]
public int Height
Field Value
Width
[Tooltip("Grid columns (world X).")]
[Min(1)]
public int Width
Field Value
WorldOrigin
[Tooltip("World-space X/Z of the grid's south-west corner.")]
public Vector2 WorldOrigin
Field Value
- Vector2
WorldSize
[Tooltip("World-space extent of the grid along X and Z.")]
public Vector2 WorldSize
Field Value
- Vector2
Methods
Contains(Vector3)
True when the position's X/Z lies inside the grid's rectangle.
public bool Contains(Vector3 worldPosition)
Parameters
worldPositionVector3
Returns
IDAt(Vector3)
The biome ID under a world position, or 0 outside the grid or where none was baked.
public int IDAt(Vector3 worldPosition)
Parameters
worldPositionVector3
Returns
Latitude01(Vector3)
0 at the south edge, 1 at the north edge; the equator is 0.5.
public float Latitude01(Vector3 worldPosition)
Parameters
worldPositionVector3
Returns
Sample(Vector3)
The biome under a world position, or null.
public BiomeTemplate Sample(Vector3 worldPosition)
Parameters
worldPositionVector3
Returns
Set(int, int, int[], Vector2, Vector2)
Replaces the whole grid.
public void Set(int width, int height, int[] biomeIDs, Vector2 worldOrigin, Vector2 worldSize)