Class ContentTableWindow
- Namespace
- SurvivorsMaker.Editor
- Assembly
- SurvivorsMaker.Editor.dll
Content Table: weapons, items/upgrades and enemies as a spreadsheet. Edit cells inline (one Undo step per edit; with several rows selected, an edit applies to all of them), sort by any column, filter, see changed cells, and round-trip CSV (import matches by Id and previews the changes first).
public sealed class ContentTableWindow : MakerToolWindow
- Inheritance
-
ObjectScriptableObjectEditorWindowContentTableWindow
- Inherited Members
-
EditorWindow.focusedWindowChangedEditorWindow.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.dataModeControllerEditorWindow.rootVisualElementEditorWindow.overlayCanvasEditorWindow.wantsMouseMoveEditorWindow.wantsMouseEnterLeaveWindowEditorWindow.wantsLessLayoutEventsEditorWindow.autoRepaintOnSceneChangeEditorWindow.maximizedEditorWindow.hasFocusEditorWindow.dockedEditorWindow.focusedWindowEditorWindow.mouseOverWindowEditorWindow.hasUnsavedChangesEditorWindow.saveChangesMessageEditorWindow.minSizeEditorWindow.maxSizeEditorWindow.titleEditorWindow.titleContentEditorWindow.depthBufferBitsEditorWindow.antiAliasEditorWindow.positionEditorWindow.windowFocusChangedScriptableObject.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.ToString()Object.nameObject.hideFlags
Constructors
ContentTableWindow()
public ContentTableWindow()
Properties
Baseline
public ContentTableBaseline Baseline { get; }
Property Value
Kind
public ContentTableKind Kind { get; }
Property Value
PendingImport
public ContentTableImport PendingImport { get; }
Property Value
ShownRows
public IReadOnlyList<ContentAssetBase> ShownRows { get; }
Property Value
ToolDescription
protected override string ToolDescription { get; }
Property Value
ToolTitle
protected override string ToolTitle { get; }
Property Value
Methods
ApplyImport()
public int ApplyImport()
Returns
ApplyView()
Filters and sorts the rows (sorting is by the current cell text, numbers by value).
public void ApplyView()
BuildBody(VisualElement)
Builds the window's controls under the shared header.
protected override void BuildBody(VisualElement root)
Parameters
rootVisualElement
Edit(ContentAssetBase, string, string)
Edits one cell; when the row is part of a multi-row selection, every selected row gets the value.
public int Edit(ContentAssetBase asset, string key, string text)
Parameters
assetContentAssetBasekeystringtextstring
Returns
OnContextChanged()
Content or settings changed (also after the first build).
protected override void OnContextChanged()
OnUndoRedo()
protected override void OnUndoRedo()
Open()
[MenuItem("Tools/Survivor Roguelite Maker/Content Table", false, 35)]
public static ContentTableWindow Open()
Returns
Open(ContentAsset, ContentTableKind)
public static ContentTableWindow Open(ContentAsset content, ContentTableKind tab)
Parameters
contentContentAssettabContentTableKind
Returns
PreviewImport(string)
Compares CSV text with the current rows and shows the changes for confirmation.
public ContentTableImport PreviewImport(string csv)
Parameters
csvstring
Returns
Reload()
public void Reload()
SetKind(ContentTableKind)
public void SetKind(ContentTableKind value)
Parameters
valueContentTableKind