整合SLSUtilities

This commit is contained in:
SoulliesOfficial
2026-01-17 11:35:49 -05:00
parent d94241f36c
commit 7ee2894a63
1338 changed files with 3051541 additions and 507034 deletions

View File

@@ -0,0 +1,29 @@
using LunaWolfStudiosEditor.ScriptableSheets.Layout;
using UnityEditor;
using UnityEngine;
namespace LunaWolfStudiosEditor.ScriptableSheets
{
public abstract class AbstractBaseSettings : IScriptableSettings
{
[SerializeField]
private bool m_Foldout;
public bool Foldout { get => m_Foldout; set => m_Foldout = value; }
public abstract GUIContent FoldoutContent { get; }
public void DrawGUI(SerializedObject target)
{
SheetLayout.DrawHorizontalLine();
m_Foldout = EditorGUILayout.Foldout(m_Foldout, FoldoutContent);
if (m_Foldout)
{
SheetLayout.Indent();
DrawProperties(target);
SheetLayout.Unindent();
}
}
protected abstract void DrawProperties(SerializedObject target);
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: ce71a7f5e7e9a9c42912c3355028e791
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Editor/Settings/SettingsData/AbstractBaseSettings.cs
uploadId: 823456

View File

@@ -0,0 +1,139 @@
using LunaWolfStudiosEditor.ScriptableSheets.Layout;
using LunaWolfStudiosEditor.ScriptableSheets.Shared;
using LunaWolfStudiosEditor.ScriptableSheets.Tables;
using System;
using UnityEditor;
using UnityEngine;
namespace LunaWolfStudiosEditor.ScriptableSheets
{
[Serializable]
public class DataTransferSettings : AbstractBaseSettings, IScriptableSettings
{
[SerializeField]
private bool m_SmartPasteEnabled;
public bool SmartPasteEnabled { get => m_SmartPasteEnabled; set => m_SmartPasteEnabled = value; }
[SerializeField]
private bool m_Headers;
public bool Headers { get => m_Headers; set => m_Headers = value; }
[SerializeField]
private bool m_PageRowsOnly;
public bool PageRowsOnly { get => m_PageRowsOnly; set => m_PageRowsOnly = value; }
[SerializeField]
private bool m_VisibleColumnsOnly;
public bool VisibleColumnsOnly { get => m_VisibleColumnsOnly; set => m_VisibleColumnsOnly = value; }
[SerializeField]
private bool m_RemoveEmptyRows;
public bool RemoveEmptyRows { get => m_RemoveEmptyRows; set => m_RemoveEmptyRows = value; }
[SerializeField]
private bool m_UseStringEnums;
public bool UseStringEnums { get => m_UseStringEnums; set => m_UseStringEnums = value; }
[SerializeField]
private bool m_IgnoreCase;
public bool IgnoreCase { get => m_IgnoreCase; set => m_IgnoreCase = value; }
[SerializeField]
private string m_RowDelimiter;
[SerializeField]
private string m_ColumnDelimiter;
[SerializeField]
private WrapOption m_WrapOption;
public WrapOption WrapOption { get => m_WrapOption; set => m_WrapOption = value; }
[SerializeField]
private EscapeOption m_EscapeOption;
public EscapeOption EscapeOption { get => m_EscapeOption; set => m_EscapeOption = value; }
[SerializeField]
private string m_CustomEscapeSequence;
[SerializeField]
private JsonSerializationFormat m_JsonSerializationFormat;
public JsonSerializationFormat JsonSerializationFormat { get => m_JsonSerializationFormat; set => m_JsonSerializationFormat = value; }
public override GUIContent FoldoutContent => SettingsContent.Foldouts.DataTransfer;
public DataTransferSettings()
{
Foldout = true;
m_SmartPasteEnabled = true;
m_Headers = false;
m_PageRowsOnly = true;
m_VisibleColumnsOnly = true;
m_RemoveEmptyRows = true;
m_UseStringEnums = true;
m_IgnoreCase = true;
SetRowDelimiter(Environment.NewLine);
SetColumnDelimiter("\t");
m_WrapOption = WrapOption.None;
m_EscapeOption = EscapeOption.None;
m_CustomEscapeSequence = string.Empty;
m_JsonSerializationFormat = JsonSerializationFormat.Flat;
}
public string GetRowDelimiter()
{
return m_RowDelimiter.GetUnescapedText();
}
public void SetRowDelimiter(string value)
{
m_RowDelimiter = value.GetEscapedText();
}
public string GetColumnDelimiter()
{
return m_ColumnDelimiter.GetUnescapedText();
}
public void SetColumnDelimiter(string value)
{
m_ColumnDelimiter = value.GetEscapedText();
}
public string GetCustomEscapeSequence()
{
return m_CustomEscapeSequence.GetUnescapedText();
}
protected override void DrawProperties(SerializedObject target)
{
m_SmartPasteEnabled = EditorGUILayout.Toggle(SettingsContent.Toggle.SmartPaste, m_SmartPasteEnabled);
m_Headers = EditorGUILayout.Toggle(SettingsContent.Toggle.Headers, m_Headers);
m_PageRowsOnly = EditorGUILayout.Toggle(SettingsContent.Toggle.PageRowsOnly, m_PageRowsOnly);
m_VisibleColumnsOnly = EditorGUILayout.Toggle(SettingsContent.Toggle.VisibleColumnsOnly, m_VisibleColumnsOnly);
m_RemoveEmptyRows = EditorGUILayout.Toggle(SettingsContent.Toggle.RemoveEmptyRows, m_RemoveEmptyRows);
m_UseStringEnums = EditorGUILayout.Toggle(SettingsContent.Toggle.UseStringEnums, m_UseStringEnums);
if (m_UseStringEnums)
{
SheetLayout.Indent();
m_IgnoreCase = EditorGUILayout.Toggle(SettingsContent.Toggle.IgnoreCase, m_IgnoreCase);
SheetLayout.Unindent();
}
m_RowDelimiter = EditorGUILayout.TextField(SettingsContent.TextField.SmartPasteRowDelimiter, m_RowDelimiter);
m_ColumnDelimiter = EditorGUILayout.TextField(SettingsContent.TextField.SmartPasteColumnDelimiter, m_ColumnDelimiter);
m_WrapOption = (WrapOption) EditorGUILayout.EnumPopup(SettingsContent.Dropdown.WrapOption, m_WrapOption);
if (m_WrapOption != WrapOption.None)
{
SheetLayout.Indent();
m_EscapeOption = (EscapeOption) EditorGUILayout.EnumPopup(SettingsContent.Dropdown.EscapeOption, m_EscapeOption);
if (m_EscapeOption == EscapeOption.Custom)
{
SheetLayout.Indent();
m_CustomEscapeSequence = EditorGUILayout.TextField(SettingsContent.TextField.CustomEscapeSequence, m_CustomEscapeSequence);
SheetLayout.Unindent();
}
SheetLayout.Unindent();
}
m_JsonSerializationFormat = (JsonSerializationFormat) EditorGUILayout.EnumPopup(SettingsContent.Dropdown.JsonSerializationFormat, m_JsonSerializationFormat);
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 1a559a18eba33de4fb2d8382786da24c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Editor/Settings/SettingsData/DataTransferSettings.cs
uploadId: 823456

View File

@@ -0,0 +1,40 @@
using LunaWolfStudiosEditor.ScriptableSheets.Layout;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace LunaWolfStudiosEditor.ScriptableSheets
{
[System.Serializable]
public class ExperimentalSettings : AbstractBaseSettings
{
[SerializeField]
private List<SerializedPropertyType> m_RenderingOverrides = new List<SerializedPropertyType>();
private HashSet<SerializedPropertyType> m_RenderingOverridesLookup;
public override GUIContent FoldoutContent => SettingsContent.Foldouts.Experimental;
public ExperimentalSettings()
{
m_RenderingOverrides = new List<SerializedPropertyType>();
m_RenderingOverridesLookup = null;
}
protected override void DrawProperties(SerializedObject target)
{
var customDrawerAllowedTypesProperty = target.FindProperty($"m_Experimental.{nameof(m_RenderingOverrides)}");
EditorGUILayout.PropertyField(customDrawerAllowedTypesProperty, SettingsContent.Label.RenderingOverrides, true);
m_RenderingOverridesLookup = new HashSet<SerializedPropertyType>(m_RenderingOverrides);
}
public HashSet<SerializedPropertyType> GetRenderingOverrides()
{
if (m_RenderingOverridesLookup == null)
{
m_RenderingOverridesLookup = new HashSet<SerializedPropertyType>(m_RenderingOverrides);
}
return m_RenderingOverridesLookup;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 05bad8da610d1b94c981a60fccfc3e45
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Editor/Settings/SettingsData/ExperimentalSettings.cs
uploadId: 823456

View File

@@ -0,0 +1,13 @@
using UnityEditor;
using UnityEngine;
namespace LunaWolfStudiosEditor.ScriptableSheets
{
public interface IScriptableSettings
{
bool Foldout { get; set; }
GUIContent FoldoutContent { get; }
void DrawGUI(SerializedObject target);
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 4aeaec5b94505c04dba151c33642ba2e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Editor/Settings/SettingsData/IScriptableSettings.cs
uploadId: 823456

View File

@@ -0,0 +1,129 @@
using LunaWolfStudiosEditor.ScriptableSheets.Layout;
using LunaWolfStudiosEditor.ScriptableSheets.Scanning;
using LunaWolfStudiosEditor.ScriptableSheets.Shared;
using UnityEditor;
using UnityEngine;
namespace LunaWolfStudiosEditor.ScriptableSheets
{
[System.Serializable]
public class ObjectManagementSettings : AbstractBaseSettings, IScriptableSettings
{
[SerializeField]
private bool m_UseExpansion;
public bool UseExpansion { get => m_UseExpansion; set => m_UseExpansion = value; }
[SerializeField]
private int m_StartingIndex;
public int StartingIndex { get => m_StartingIndex; set => m_StartingIndex = value; }
[SerializeField]
private int m_IndexPadding;
public int IndexPadding { get => m_IndexPadding; set => m_IndexPadding = value; }
[SerializeField]
private string m_NewObjectName;
public string NewObjectName { get => m_NewObjectName; set => m_NewObjectName = value; }
[SerializeField]
private string m_NewObjectPrefix;
public string NewObjectPrefix { get => m_NewObjectPrefix; set => m_NewObjectPrefix = value; }
[SerializeField]
private string m_NewObjectSuffix;
public string NewObjectSuffix { get => m_NewObjectSuffix; set => m_NewObjectSuffix = value; }
[SerializeField]
private Object m_DefaultMainAsset;
public Object DefaultMainAsset { get => m_DefaultMainAsset; set => m_DefaultMainAsset = value; }
[SerializeField]
private ScanSettings m_Scan;
public ScanSettings Scan { get => m_Scan; set => m_Scan = value; }
[SerializeField]
private SearchSettings m_Search;
public SearchSettings Search { get => m_Search; set => m_Search = value; }
public override GUIContent FoldoutContent => SettingsContent.Foldouts.ObjectManagement;
public ObjectManagementSettings()
{
Foldout = true;
m_UseExpansion = true;
m_StartingIndex = 0;
m_IndexPadding = 1;
m_NewObjectName = string.Empty;
m_NewObjectPrefix = "New";
m_NewObjectSuffix = string.Empty;
m_DefaultMainAsset = null;
m_Scan = new ScanSettings();
m_Search = new SearchSettings();
}
protected override void DrawProperties(SerializedObject target)
{
m_UseExpansion = EditorGUILayout.Toggle(SettingsContent.Toggle.UseExpansion, m_UseExpansion);
if (m_UseExpansion)
{
SheetLayout.Indent();
m_StartingIndex = EditorGUILayout.IntField(SettingsContent.DigitField.StartingIndex, m_StartingIndex);
m_IndexPadding = EditorGUILayout.IntSlider(SettingsContent.DigitField.IndexPadding, m_IndexPadding, 1, 10);
SheetLayout.Unindent();
}
m_NewObjectName = EditorGUILayout.TextField(SettingsContent.TextField.NewObjectName, m_NewObjectName);
m_NewObjectPrefix = EditorGUILayout.TextField(SettingsContent.TextField.NewObjectPrefix, m_NewObjectPrefix);
m_NewObjectSuffix = EditorGUILayout.TextField(SettingsContent.TextField.NewObjectSuffix, m_NewObjectSuffix);
var newMainAsset = EditorGUILayout.ObjectField(SettingsContent.ObjectField.DefaultMainAsset, m_DefaultMainAsset, typeof(Object), false);
if (IsSupportedMainAsset(newMainAsset))
{
m_DefaultMainAsset = newMainAsset;
}
EditorGUILayout.Space();
EditorGUILayout.LabelField(SettingsContent.Label.Scanning, EditorStyles.boldLabel);
m_Scan.Option = (ScanOption) EditorGUILayout.EnumPopup(SettingsContent.Dropdown.ScanOption, m_Scan.Option);
m_Scan.PathOption = (ScanPathOption) EditorGUILayout.EnumPopup(SettingsContent.Dropdown.ScanPathOption, m_Scan.PathOption);
if (m_Scan.PathOption == ScanPathOption.Default)
{
m_Scan.Path = SheetLayout.DrawAssetPathSettingGUI(SettingsContent.TextField.ScanPath, SettingsContent.Button.EditScanPath, m_Scan.Path, SheetLayout.DefaultLabel);
}
m_Scan.ShowProgressBar = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowScanProgressBar, m_Scan.ShowProgressBar);
m_Scan.RootPrefabsOnly = EditorGUILayout.Toggle(SettingsContent.Toggle.RootPrefabsOnly, m_Scan.RootPrefabsOnly);
EditorGUILayout.Space();
EditorGUILayout.LabelField(SettingsContent.Label.Searching, EditorStyles.boldLabel);
m_Search.CaseSensitive = EditorGUILayout.Toggle(SettingsContent.Toggle.CaseSensitive, m_Search.CaseSensitive);
m_Search.StartsWith = EditorGUILayout.Toggle(SettingsContent.Toggle.StartsWith, m_Search.StartsWith);
}
private bool IsSupportedMainAsset(Object obj)
{
if (obj == null)
{
return true;
}
var assetPath = AssetDatabase.GetAssetPath(obj);
if (string.IsNullOrEmpty(assetPath))
{
Debug.LogWarning($"Found invalid asset path for '{obj.name}'.");
return false;
}
// Sub Assets cannot be Main Assets.
var mainAsset = AssetDatabase.LoadMainAssetAtPath(assetPath);
if (obj != mainAsset)
{
Debug.LogWarning($"{obj.name} is not a valid Main Asset.");
return false;
}
if (obj is ScriptableObject || obj is GameObject || obj is Material)
{
return true;
}
Debug.LogWarning($"Object {obj.name} of type {obj.GetType()} is not a supported Main Asset type. Only ScriptableObjects, Prefabs, and Materials are supported.");
return false;
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 59a6b402b5094214fb95ead7e0e551fb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Editor/Settings/SettingsData/ObjectManagementSettings.cs
uploadId: 823456

View File

@@ -0,0 +1,165 @@
using LunaWolfStudiosEditor.ScriptableSheets.Layout;
using LunaWolfStudiosEditor.ScriptableSheets.Scanning;
using LunaWolfStudiosEditor.ScriptableSheets.Shared;
using LunaWolfStudiosEditor.ScriptableSheets.Tables;
using UnityEditor;
using UnityEngine;
namespace LunaWolfStudiosEditor.ScriptableSheets
{
[System.Serializable]
public class UserInterfaceSettings : AbstractBaseSettings, IScriptableSettings
{
private const int MaxArraySize = 5000;
[SerializeField]
private SheetAsset m_DefaultSheetAssets;
public SheetAsset DefaultSheetAssets { get => m_DefaultSheetAssets; set => m_DefaultSheetAssets = value; }
[SerializeField]
private bool m_AutoPin;
public bool AutoPin { get => m_AutoPin; set => m_AutoPin = value; }
[SerializeField]
private bool m_ConfirmDelete;
public bool ConfirmDelete { get => m_ConfirmDelete; set => m_ConfirmDelete = value; }
[SerializeField]
private HeaderFormat m_HeaderFormat;
public HeaderFormat HeaderFormat { get => m_HeaderFormat; set => m_HeaderFormat = value; }
[SerializeField]
private bool m_LockNames;
public bool LockNames { get => m_LockNames; set => m_LockNames = value; }
[SerializeField]
private int m_RowLineHeight;
public int RowLineHeight { get => m_RowLineHeight; set => m_RowLineHeight = value; }
[SerializeField]
private AssetPreviewSettings m_AssetPreview;
public AssetPreviewSettings AssetPreview { get => m_AssetPreview; set => m_AssetPreview = value; }
[SerializeField]
private bool m_ShowRowIndex;
public bool ShowRowIndex { get => m_ShowRowIndex; set => m_ShowRowIndex = value; }
[SerializeField]
private bool m_ShowColumnIndex;
public bool ShowColumnIndex { get => m_ShowColumnIndex; set => m_ShowColumnIndex = value; }
[SerializeField]
private bool m_ShowChildren;
public bool ShowChildren { get => m_ShowChildren; set => m_ShowChildren = value; }
[SerializeField]
private bool m_ShowArrays;
public bool ShowArrays { get => m_ShowArrays; set => m_ShowArrays = value; }
[SerializeField]
private bool m_OverrideArraySize;
public bool OverrideArraySize { get => m_OverrideArraySize; set => m_OverrideArraySize = value; }
[SerializeField]
private int m_ArraySize;
public int ArraySize { get => m_ArraySize; set => m_ArraySize = value; }
[SerializeField]
private bool m_ShowAssetPath;
public bool ShowAssetPath { get => m_ShowAssetPath; set => m_ShowAssetPath = value; }
[SerializeField]
private bool m_ShowGuid;
public bool ShowGuid { get => m_ShowGuid; set => m_ShowGuid = value; }
[SerializeField]
private bool m_ShowReadOnly;
public bool ShowReadOnly { get => m_ShowReadOnly; set => m_ShowReadOnly = value; }
[SerializeField]
private bool m_SubAssetFilters = true;
public bool SubAssetFilters { get => m_SubAssetFilters; set => m_SubAssetFilters = value; }
[SerializeField]
private TableNavSettings m_TableNav;
public TableNavSettings TableNav { get => m_TableNav; set => m_TableNav = value; }
public override GUIContent FoldoutContent => SettingsContent.Foldouts.UserInterface;
public UserInterfaceSettings()
{
Foldout = true;
m_DefaultSheetAssets = SheetAsset.ScriptableObject;
m_AutoPin = true;
m_ConfirmDelete = true;
m_HeaderFormat = HeaderFormat.Friendly;
m_LockNames = false;
m_RowLineHeight = 1;
m_AssetPreview = new AssetPreviewSettings();
m_ShowRowIndex = false;
m_ShowColumnIndex = false;
m_ShowChildren = true;
m_ShowArrays = true;
m_OverrideArraySize = false;
m_ArraySize = 10;
m_ShowAssetPath = false;
m_ShowGuid = false;
m_ShowReadOnly = false;
m_SubAssetFilters = true;
m_TableNav = new TableNavSettings();
}
protected override void DrawProperties(SerializedObject target)
{
m_DefaultSheetAssets = (SheetAsset) EditorGUILayout.EnumFlagsField(SettingsContent.Dropdown.DefaultSheetAssets, m_DefaultSheetAssets);
if (m_DefaultSheetAssets == SheetAsset.Default)
{
m_DefaultSheetAssets = SheetAsset.ScriptableObject;
}
m_AutoPin = EditorGUILayout.Toggle(SettingsContent.Toggle.AutoPin, m_AutoPin);
m_ConfirmDelete = EditorGUILayout.Toggle(SettingsContent.Toggle.ConfirmDelete, m_ConfirmDelete);
m_HeaderFormat = (HeaderFormat) EditorGUILayout.EnumPopup(SettingsContent.Dropdown.HeaderFormat, m_HeaderFormat);
m_LockNames = EditorGUILayout.Toggle(SettingsContent.Toggle.LockNames, m_LockNames);
m_RowLineHeight = EditorGUILayout.IntSlider(SettingsContent.DigitField.RowLineHeight, m_RowLineHeight, 1, 10);
m_AssetPreview.Show = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowAssetPreviews, m_AssetPreview.Show);
if (m_AssetPreview.Show)
{
SheetLayout.Indent();
m_AssetPreview.ScaleMode = (ScaleMode) EditorGUILayout.EnumPopup(SettingsContent.Dropdown.PreviewScaleMode, m_AssetPreview.ScaleMode);
SheetLayout.Unindent();
}
m_ShowRowIndex = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowRowIndex, m_ShowRowIndex);
m_ShowColumnIndex = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowColumnIndex, m_ShowColumnIndex);
m_ShowChildren = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowChildren, m_ShowChildren);
if (m_ShowChildren)
{
SheetLayout.Indent();
m_ShowArrays = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowArrays, m_ShowArrays);
if (m_ShowArrays)
{
SheetLayout.Indent();
m_OverrideArraySize = EditorGUILayout.Toggle(SettingsContent.Toggle.OverrideArraySize, m_OverrideArraySize);
if (m_OverrideArraySize)
{
SheetLayout.Indent();
m_ArraySize = Mathf.Clamp(EditorGUILayout.IntField(SettingsContent.DigitField.ArraySize, m_ArraySize), 0, MaxArraySize);
SheetLayout.Unindent();
}
SheetLayout.Unindent();
}
SheetLayout.Unindent();
}
m_ShowAssetPath = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowAssetPath, m_ShowAssetPath);
m_ShowGuid = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowGuid, m_ShowGuid);
m_ShowReadOnly = EditorGUILayout.Toggle(SettingsContent.Toggle.ShowReadOnly, m_ShowReadOnly);
m_SubAssetFilters = EditorGUILayout.Toggle(SettingsContent.Toggle.SubAssetFilters, m_SubAssetFilters);
EditorGUILayout.Space();
EditorGUILayout.LabelField(SettingsContent.Label.TableNav, EditorStyles.boldLabel);
m_TableNav.AutoScroll = EditorGUILayout.Toggle(SettingsContent.Toggle.AutoScroll, m_TableNav.AutoScroll);
m_TableNav.AutoSelect = EditorGUILayout.Toggle(SettingsContent.Toggle.AutoSelect, m_TableNav.AutoSelect);
m_TableNav.HighlightAlpha = EditorGUILayout.Slider(SettingsContent.DigitField.HighlightAlpha, m_TableNav.HighlightAlpha, 0.0f, 0.25f);
m_TableNav.HighlightSelectedRow = EditorGUILayout.Toggle(SettingsContent.Toggle.HighlightSelectedRow, m_TableNav.HighlightSelectedRow);
m_TableNav.HighlightSelectedColumn = EditorGUILayout.Toggle(SettingsContent.Toggle.HighlightSelectedColumn, m_TableNav.HighlightSelectedColumn);
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: e6b4cae0954578c47853ed85b3e5074f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Editor/Settings/SettingsData/UserInterfaceSettings.cs
uploadId: 823456

View File

@@ -0,0 +1,77 @@
using LunaWolfStudiosEditor.ScriptableSheets.Layout;
using UnityEditor;
using UnityEngine;
namespace LunaWolfStudiosEditor.ScriptableSheets
{
[System.Serializable]
public class WorkloadSettings : AbstractBaseSettings, IScriptableSettings
{
[SerializeField]
private bool m_AutoSave;
public bool AutoSave { get => m_AutoSave; set => m_AutoSave = value; }
[SerializeField]
private bool m_AutoScan;
public bool AutoScan { get => m_AutoScan; set => m_AutoScan = value; }
[SerializeField]
private bool m_AutoUpdate;
public bool AutoUpdate { get => m_AutoUpdate; set => m_AutoUpdate = value; }
[SerializeField]
private bool m_Debug;
public bool Debug { get => m_Debug; set => m_Debug = value; }
[SerializeField]
private bool m_Virtualization;
public bool Virtualization { get => m_Virtualization; set => m_Virtualization = value; }
[SerializeField]
private int m_MaxIterations;
public int MaxIterations { get => m_MaxIterations; set => m_MaxIterations = value; }
[SerializeField]
private int m_MaxVisibleCells;
public int MaxVisibleCells { get => m_MaxVisibleCells; set => m_MaxVisibleCells = value; }
[SerializeField]
private int m_RowsPerPage;
public int RowsPerPage { get => m_RowsPerPage; set => m_RowsPerPage = value; }
[SerializeField]
private int m_VisibleColumnLimit;
public int VisibleColumnLimit { get => m_VisibleColumnLimit; set => m_VisibleColumnLimit = value; }
public override GUIContent FoldoutContent => SettingsContent.Foldouts.Workload;
public WorkloadSettings()
{
Foldout = false;
m_AutoSave = false;
m_AutoScan = false;
m_AutoUpdate = true;
m_Debug = false;
m_Virtualization = true;
m_MaxIterations = 3000;
m_MaxVisibleCells = 800;
m_RowsPerPage = 20;
m_VisibleColumnLimit = 40;
}
protected override void DrawProperties(SerializedObject target)
{
m_AutoSave = EditorGUILayout.Toggle(SettingsContent.Toggle.AutoSave, m_AutoSave);
m_AutoScan = EditorGUILayout.Toggle(SettingsContent.Toggle.AutoScan, m_AutoScan);
m_AutoUpdate = EditorGUILayout.Toggle(SettingsContent.Toggle.AutoUpdate, m_AutoUpdate);
m_Debug = EditorGUILayout.Toggle(SettingsContent.Toggle.Debug, m_Debug);
m_Virtualization = EditorGUILayout.Toggle(SettingsContent.Toggle.Virtualization, m_Virtualization);
var maxIterationsStepIndex = Mathf.Max(1, m_MaxIterations / 1000);
maxIterationsStepIndex = EditorGUILayout.IntSlider(SettingsContent.DigitField.MaxIterations, maxIterationsStepIndex, 1, 10);
m_MaxIterations = maxIterationsStepIndex * 1000;
m_MaxVisibleCells = EditorGUILayout.IntSlider(SettingsContent.DigitField.MaxVisibleCells, m_MaxVisibleCells, 100, 1600);
m_RowsPerPage = EditorGUILayout.IntSlider(SettingsContent.DigitField.RowsPerPage, m_RowsPerPage, 1, Mathf.Min(100, m_MaxVisibleCells / m_VisibleColumnLimit));
m_VisibleColumnLimit = EditorGUILayout.IntSlider(SettingsContent.DigitField.VisibleColumnLimit, m_VisibleColumnLimit, 1, Mathf.Min(100, m_MaxVisibleCells / m_RowsPerPage));
}
}
}

View File

@@ -0,0 +1,18 @@
fileFormatVersion: 2
guid: 345a147aa02843d49a7d334364ffff59
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 284559
packageName: Scriptable Sheets
packageVersion: 1.8.0
assetPath: Packages/com.lunawolfstudios.scriptablesheets/Editor/Settings/SettingsData/WorkloadSettings.cs
uploadId: 823456