Table of Contents

Class GridConfigurationSaver

Unity Editor utility for saving and applying grid configurations. Allows multiple grid configurations to be saved and applied in the scene editor.

[ExecuteAlways]
public class GridConfigurationSaver : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
GridConfigurationSaver
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
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.name
Object.hideFlags

Fields

Show

Enables visualization of grid bounds in the editor.

public bool Show

Field Value

bool

Properties

SavedGridConfigurations

Gets the runtime list of saved grid configurations.

public SwiftList<SerializableGridConfiguration> SavedGridConfigurations { get; }

Property Value

SwiftList<SerializableGridConfiguration>

SpatialGridCellSize

Gets the spatial hash cell size used when creating a world.

public int SpatialGridCellSize { get; }

Property Value

int

Methods

EarlyApply()

Applies all saved grid configurations to the resolved scene world.

public void EarlyApply()

EarlyApply(GridWorld)

Applies all saved grid configurations to the supplied GridWorld.

public void EarlyApply(GridWorld world)

Parameters

world GridWorld

The active world that receives the saved grids.

Save(Vector3d, Vector3d, int)

Saves the current grid configuration into the list.

public void Save(Vector3d boundsMin, Vector3d boundsMax, int scanCellSize)

Parameters

boundsMin Vector3d

The inclusive minimum world bounds.

boundsMax Vector3d

The inclusive maximum world bounds.

scanCellSize int

The scan cell size used by the grid.

Save(SerializableGridConfiguration)

Saves the supplied grid configuration into the list.

public void Save(SerializableGridConfiguration configuration)

Parameters

configuration SerializableGridConfiguration

The serializable configuration to append.