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
Object
Component
Behaviour
MonoBehaviour
LevelAuthoring
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.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

Constructors

LevelAuthoring()

public LevelAuthoring()

Fields

buildSlots

Build slots in index order; empty collects children.

public List<BuildSlotAuthoring> buildSlots

Field Value

List<BuildSlotAuthoring>

cameraFraming

Scene camera framing, used when overrideCameraFraming is set.

public CameraFramingData cameraFraming

Field Value

CameraFramingData

level

Level asset providing waves, economy and towers.

public LevelAsset level

Field Value

LevelAsset

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

bool

paths

Paths in index order; empty collects children.

public List<PathAuthoring> paths

Field Value

List<PathAuthoring>

useSceneGeometry

When false, the level asset's own geometry is used instead of the scene's.

public bool useSceneGeometry

Field Value

bool

Properties

EffectiveCameraFraming

The camera framing this scene plays with (override, else the level asset's, else the default).

public CameraFramingData EffectiveCameraFraming { get; }

Property Value

CameraFramingData

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

startingGoldOverride int?
additionalTemplates IReadOnlyList<EntityAssetBase>
additionalProjectiles IReadOnlyList<ProjectileAsset>

Returns

BakedLevel

CollectGeometry(List<PathData>, List<BuildSlotData>)

Collects scene geometry into new data lists.

public void CollectGeometry(List<PathData> pathOutput, List<BuildSlotData> slotOutput)

Parameters

pathOutput List<PathData>
slotOutput List<BuildSlotData>

WriteGeometry(LevelAsset)

Copies scene geometry into a level asset (call from editor code and mark it dirty).

public void WriteGeometry(LevelAsset target)

Parameters

target LevelAsset