Class UnitWorkshopWindow

Namespace
TDMaker.Editor
Assembly
TDMaker.Editor.dll

Unit Workshop (Tools > 2D Tower Defense Maker > Unit Workshop): enemies, heroes, soldiers, towers, projectiles, status effects and spells in one window. A searchable list (create from presets, duplicate, rename, delete, see who uses an asset), an animation preview (art set frames, Faces Left check, health bar, pivot, projectile flight), tabbed flat forms (basics, attacks, mechanic cards, effects and tags, look with bulk frame registration, hero growth, audio, engagement places), computed values that follow the simulation's damage rules, and a sandbox that plays the unit against chosen towers. Edits use Undo; several selected assets of one type are edited together.

public sealed class UnitWorkshopWindow : EditorWindow
Inheritance
Object
ScriptableObject
EditorWindow
UnitWorkshopWindow
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.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

UnitWorkshopWindow()

public UnitWorkshopWindow()

Properties

Active

The asset whose details are shown.

public Object Active { get; }

Property Value

Object

CurrentTab

The visible tab.

public UnitWorkshopWindow.Tab CurrentTab { get; set; }

Property Value

UnitWorkshopWindow.Tab

Selected

The selected assets (one type is edited at a time).

public IReadOnlyList<Object> Selected { get; }

Property Value

IReadOnlyList<Object>

Methods

DiscardChanges()

public override void DiscardChanges()

KindOf(Object)

Family of an asset.

public static UnitWorkshopWindow.Kind KindOf(Object asset)

Parameters

asset Object

Returns

UnitWorkshopWindow.Kind

Open()

Opens the Unit Workshop.

[MenuItem("Tools/2D Tower Defense Maker/Unit Workshop", priority = 6)]
public static UnitWorkshopWindow Open()

Returns

UnitWorkshopWindow

Open(Object, Tab)

Opens the Unit Workshop with asset selected on startTab.

public static UnitWorkshopWindow Open(Object asset, UnitWorkshopWindow.Tab startTab = Tab.Basics)

Parameters

asset Object
startTab UnitWorkshopWindow.Tab

Returns

UnitWorkshopWindow

ResolveArtSet(ArtSet, string, IList<ArtSet>)

The art set to show viewKey with: chosen when it has a drawn entry for the key, otherwise the first of candidates that has one, otherwise chosen.

public static ArtSet ResolveArtSet(ArtSet chosen, string viewKey, IList<ArtSet> candidates)

Parameters

chosen ArtSet
viewKey string
candidates IList<ArtSet>

Returns

ArtSet

RevealCreated(Object)

Refreshes the list and reveals a newly created asset even when old search/tag filters excluded it.

public void RevealCreated(Object asset)

Parameters

asset Object

SaveChanges()

public override void SaveChanges()