diff --git a/src/DragonDocs/DragonDocs.cs b/src/DragonDocs/DragonDocs.cs index a4be64a..436f95d 100644 --- a/src/DragonDocs/DragonDocs.cs +++ b/src/DragonDocs/DragonDocs.cs @@ -1,5 +1,4 @@ -using DCFApixels.DragonECS.PoolsCore; -using System; +using System; using System.Collections.Generic; using System.Runtime.Serialization; using UnityEngine; @@ -10,9 +9,9 @@ namespace DCFApixels.DragonECS.Unity.Docs [DataContract] public class DragonDocs { - [DataMember, SerializeField] + [DataMember, SerializeField] private DragonDocsMeta[] _metas; - + public ReadOnlySpan Metas { get { return new ReadOnlySpan(_metas); } diff --git a/src/DragonDocs/Editors/DragonDocsPrefs.cs b/src/DragonDocs/Editors/DragonDocsPrefs.cs index cd0b929..f1211b7 100644 --- a/src/DragonDocs/Editors/DragonDocsPrefs.cs +++ b/src/DragonDocs/Editors/DragonDocsPrefs.cs @@ -25,10 +25,10 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors } public ReadOnlySpan Infos { - get + get { InitInfos(); - return new ReadOnlySpan(_infos); + return new ReadOnlySpan(_infos); } } @@ -124,7 +124,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors public void Save(DragonDocs docs) { m_docs = docs; - if(m_isExpands == null || m_isExpands.Length != docs.Metas.Length) + if (m_isExpands == null || m_isExpands.Length != docs.Metas.Length) { Array.Resize(ref m_isExpands, docs.Metas.Length); m_isExpands[0] = true; diff --git a/src/DragonDocs/Editors/DragonDocsWindow.cs b/src/DragonDocs/Editors/DragonDocsWindow.cs index 3cc9acc..4bed330 100644 --- a/src/DragonDocs/Editors/DragonDocsWindow.cs +++ b/src/DragonDocs/Editors/DragonDocsWindow.cs @@ -72,7 +72,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors System.Array.Resize(ref _searchingHideGroupMap, DragonDocsPrefs.instance.Infos.Length); } - if(_selectedIndex < 0 || _selectedIndex >= infos.Length) + if (_selectedIndex < 0 || _selectedIndex >= infos.Length) { _selectedIndex = 0; } @@ -153,7 +153,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors private void Searh() { - _searchingSample = _searchingSampleEnter; + _searchingSample = _searchingSampleEnter; _searchingSampleChanged = false; DragonDocs docs = DragonDocsPrefs.instance.Docs; var metas = docs.Metas; @@ -332,7 +332,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors clippingDepth = int.MaxValue; } - if(_searchingSample.Length == 0) + if (_searchingSample.Length == 0) { EditorGUI.indentLevel = groupInfo.Depth; } diff --git a/src/EcsPipelineTemplate/EcsPipelineTemplateSO.cs b/src/EcsPipelineTemplate/EcsPipelineTemplateSO.cs index 67b0207..8dd3d06 100644 --- a/src/EcsPipelineTemplate/EcsPipelineTemplateSO.cs +++ b/src/EcsPipelineTemplate/EcsPipelineTemplateSO.cs @@ -93,7 +93,7 @@ namespace DCFApixels.DragonECS int lastNewLayersCount = newLayers.Count; foreach (var pair in builtinLayerIndexes) { - if(pair.Value < 0) + if (pair.Value < 0) { newLayers.Add(pair.Key); } diff --git a/src/EcsPipelineTemplate/ReferenceButtonAttribute.cs b/src/EcsPipelineTemplate/ReferenceButtonAttribute.cs index 8ac98c9..1819606 100644 --- a/src/EcsPipelineTemplate/ReferenceButtonAttribute.cs +++ b/src/EcsPipelineTemplate/ReferenceButtonAttribute.cs @@ -55,7 +55,7 @@ namespace DCFApixels.DragonECS.Unity.Editors var splitedGroup = group.Splited; Item parent = root; - if(splitedGroup.Count > 0) + if (splitedGroup.Count > 0) { int i = 1; foreach (var subgroup in splitedGroup) @@ -105,7 +105,7 @@ namespace DCFApixels.DragonECS.Unity.Editors public Key(MetaGroup group, int length) { Group = group; - Length = length; + Length = length; } public bool Equals(Key other) { diff --git a/src/Internal/Editor/EcsGUI.cs b/src/Internal/Editor/EcsGUI.cs index 153d1e1..2efe5a0 100644 --- a/src/Internal/Editor/EcsGUI.cs +++ b/src/Internal/Editor/EcsGUI.cs @@ -496,7 +496,7 @@ namespace DCFApixels.DragonECS.Unity.Editors public static bool IconButton(Texture icon, float iconPadding = 0, string description = null, GUIStyle style = null, params GUILayoutOption[] options) { bool result; - if(style == null) + if (style == null) { result = GUILayout.Button(UnityEditorUtility.GetLabel(string.Empty), options); } @@ -615,7 +615,7 @@ namespace DCFApixels.DragonECS.Unity.Editors object data = pool.GetRaw(entityID); Color panelColor = SelectPanelColor(meta, index, total).Desaturate(EscEditorConsts.COMPONENT_DRAWER_DESATURATE); - + Type componentType = pool.ComponentType; ExpandMatrix expandMatrix = ExpandMatrix.Take(componentType); diff --git a/src/Internal/Editor/UnityEditorUtility.cs b/src/Internal/Editor/UnityEditorUtility.cs index dc2b47d..ded6920 100644 --- a/src/Internal/Editor/UnityEditorUtility.cs +++ b/src/Internal/Editor/UnityEditorUtility.cs @@ -122,7 +122,7 @@ namespace DCFApixels.DragonECS.Unity.Editors script = null; string name = type.Name; int indexOf = name.LastIndexOf('`'); - if(indexOf >= 0) + if (indexOf >= 0) { name = name.Substring(0, indexOf); }