Class LevelAuthoring
- Namespace
- TDMaker.Unity.Authoring
- Assembly
- TDMaker.Unity.dll
Combines a LevelAsset (waves, economy, towers) with scene geometry from PathAuthoring and BuildSlotAuthoring components. Empty lists are filled from children in hierarchy order.
[AddComponentMenu("2D Tower Defense Maker/Level Authoring")]
public sealed class LevelAuthoring : MonoBehaviour
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourLevelAuthoring
- 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.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
Constructors
LevelAuthoring()
public LevelAuthoring()
Fields
buildSlots
Build slots in index order; empty collects children.
public List<BuildSlotAuthoring> buildSlots
Field Value
cameraFraming
Scene camera framing, used when overrideCameraFraming is set.
public CameraFramingData cameraFraming
Field Value
level
Level asset providing waves, economy and towers.
public LevelAsset level
Field Value
overrideCameraFraming
Use cameraFraming instead of the level asset's camera framing.
[Tooltip("Use this scene's camera framing instead of the Level Asset's.")]
public bool overrideCameraFraming
Field Value
paths
Paths in index order; empty collects children.
public List<PathAuthoring> paths
Field Value
useSceneGeometry
When false, the level asset's own geometry is used instead of the scene's.
public bool useSceneGeometry
Field Value
Properties
EffectiveCameraFraming
The camera framing this scene plays with (override, else the level asset's, else the default).
public CameraFramingData EffectiveCameraFraming { get; }
Property Value
Methods
Bake(int?, IReadOnlyList<EntityAssetBase>, IReadOnlyList<ProjectileAsset>)
Bakes the level, using scene geometry when enabled and present. additionalTemplates and
additionalProjectiles are passed to Bake(IReadOnlyList<PathData>, IReadOnlyList<BuildSlotData>, int?, IReadOnlyList<EntityAssetBase>, IReadOnlyList<ProjectileAsset>).
public BakedLevel Bake(int? startingGoldOverride = null, IReadOnlyList<EntityAssetBase> additionalTemplates = null, IReadOnlyList<ProjectileAsset> additionalProjectiles = null)
Parameters
startingGoldOverrideint?additionalTemplatesIReadOnlyList<EntityAssetBase>additionalProjectilesIReadOnlyList<ProjectileAsset>
Returns
CollectGeometry(List<PathData>, List<BuildSlotData>)
Collects scene geometry into new data lists.
public void CollectGeometry(List<PathData> pathOutput, List<BuildSlotData> slotOutput)
Parameters
pathOutputList<PathData>slotOutputList<BuildSlotData>
WriteGeometry(LevelAsset)
Copies scene geometry into a level asset (call from editor code and mark it dirty).
public void WriteGeometry(LevelAsset target)
Parameters
targetLevelAsset