Class GridConfigurationSaver
- Namespace
- GridForge.Configuration
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
-
ObjectComponentBehaviourMonoBehaviourGridConfigurationSaver
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.didStartMonoBehaviour.didAwakeMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.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.transformComponent.transformHandleComponent.gameObjectComponent.tagObject.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
Show
Enables visualization of grid bounds in the editor.
public bool Show
Field Value
Properties
SavedGridConfigurations
Gets the runtime list of saved grid configurations.
public SwiftList<SerializableGridConfiguration> SavedGridConfigurations { get; }
Property Value
SpatialGridCellSize
Gets the spatial hash cell size used when creating a world.
public int SpatialGridCellSize { get; }
Property Value
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
worldGridWorldThe 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
boundsMinVector3dThe inclusive minimum world bounds.
boundsMaxVector3dThe inclusive maximum world bounds.
scanCellSizeintThe scan cell size used by the grid.
Save(SerializableGridConfiguration)
Saves the supplied grid configuration into the list.
public void Save(SerializableGridConfiguration configuration)
Parameters
configurationSerializableGridConfigurationThe serializable configuration to append.