Class MapEditorWindow

Namespace
TDMaker.Editor
Assembly
TDMaker.Editor.dll

Map Editor (Tools > 2D Tower Defense Maker > Map Editor): turns a painted map into a level. Drop a sprite or texture as the background (the camera bounds fit it), draw smooth curved paths with a few clicks, place build slots with automatic rally points, set where each entrance's wave-call button appears, then Validate, Dry Run and Bake — all with Undo and in the Scene view (2D).

public sealed class MapEditorWindow : EditorWindow
Inheritance
Object
ScriptableObject
EditorWindow
MapEditorWindow
Inherited Members
EditorWindow.focusedWindowChanged
EditorWindow.BeginWindows()
EditorWindow.EndWindows()
EditorWindow.ShowNotification(GUIContent)
EditorWindow.RemoveNotification()
EditorWindow.ShowTab()
EditorWindow.Focus()
EditorWindow.ShowUtility()
EditorWindow.ShowPopup()
EditorWindow.ShowModalUtility()
EditorWindow.ShowAsDropDown(Rect, Vector2)
EditorWindow.Show()
EditorWindow.ShowAuxWindow()
EditorWindow.ShowModal()
EditorWindow.GetWindow<T>()
EditorWindow.HasOpenInstances<T>()
EditorWindow.FocusWindowIfItsOpen<T>()
EditorWindow.GetWindowWithRect<T>(Rect)
EditorWindow.SaveChanges()
EditorWindow.DiscardChanges()
EditorWindow.Close()
EditorWindow.Repaint()
EditorWindow.SendEvent(Event)
EditorWindow.GetExtraPaneTypes()
EditorWindow.dataModeController
EditorWindow.rootVisualElement
EditorWindow.overlayCanvas
EditorWindow.wantsMouseMove
EditorWindow.wantsMouseEnterLeaveWindow
EditorWindow.wantsLessLayoutEvents
EditorWindow.autoRepaintOnSceneChange
EditorWindow.maximized
EditorWindow.hasFocus
EditorWindow.docked
EditorWindow.focusedWindow
EditorWindow.mouseOverWindow
EditorWindow.hasUnsavedChanges
EditorWindow.saveChangesMessage
EditorWindow.minSize
EditorWindow.maxSize
EditorWindow.title
EditorWindow.titleContent
EditorWindow.depthBufferBits
EditorWindow.antiAlias
EditorWindow.position
EditorWindow.windowFocusChanged
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.name
Object.hideFlags

Constructors

MapEditorWindow()

public MapEditorWindow()

Fields

DefaultSize

Size of a newly opened Map Editor window.

public static readonly Vector2 DefaultSize

Field Value

Vector2

MinWidth

Narrowest the Map Editor gets (tabs, buttons and labels fit without clipping).

public const float MinWidth = 360

Field Value

float

Properties

ActiveTool

The tool active in the open Map Editor (None when closed). Scene inspectors defer to it.

public static MapEditorWindow.Tool ActiveTool { get; }

Property Value

MapEditorWindow.Tool

DryRunSummary

Latest in-window balance summary (the full report is also logged).

public string DryRunSummary { get; }

Property Value

string

IsEditingPaths

Whether the open Map Editor is editing path points or wave-call buttons (path inspectors then only draw).

public static bool IsEditingPaths { get; }

Property Value

bool

ValidationSummary

Latest validator summary, including error and warning totals.

public string ValidationSummary { get; }

Property Value

string

Methods

DefaultRect(Rect)

A window rect of DefaultSize at the left of the main editor window (kept on screen).

public static Rect DefaultRect(Rect current)

Parameters

current Rect

Returns

Rect

Open()

Opens the Map Editor.

[MenuItem("Tools/2D Tower Defense Maker/Map Editor", priority = 5)]
public static MapEditorWindow Open()

Returns

MapEditorWindow

Open(LevelAuthoring, Tool)

Opens the Map Editor on target with startTool active.

public static MapEditorWindow Open(LevelAuthoring target, MapEditorWindow.Tool startTool)

Parameters

target LevelAuthoring
startTool MapEditorWindow.Tool

Returns

MapEditorWindow