com.artromskiy.deltaecs.unity 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/Editor/BoundEntityRootEditor.cs +288 -0
  3. package/Editor/BoundEntityRootEditor.cs.meta +2 -0
  4. package/Editor/ComponentDropdown.cs +73 -0
  5. package/Editor/ComponentDropdown.cs.meta +2 -0
  6. package/Editor/ComponentListController.cs +26 -0
  7. package/Editor/ComponentListController.cs.meta +2 -0
  8. package/Editor/DeltaECS.Unity.Editor.asmdef +18 -0
  9. package/Editor/DeltaECS.Unity.Editor.asmdef.meta +7 -0
  10. package/Editor/EditorLifecycle.cs +143 -0
  11. package/Editor/EditorLifecycle.cs.meta +2 -0
  12. package/Editor/EntityInspectorTarget.cs +26 -0
  13. package/Editor/EntityInspectorTarget.cs.meta +3 -0
  14. package/Editor/HierarchyMenu.cs +85 -0
  15. package/Editor/HierarchyMenu.cs.meta +2 -0
  16. package/Editor/HierarchyNodeHandler.cs +950 -0
  17. package/Editor/HierarchyNodeHandler.cs.meta +2 -0
  18. package/Editor/HierarchySelection.cs +171 -0
  19. package/Editor/HierarchySelection.cs.meta +3 -0
  20. package/Editor/InspectorState.cs +220 -0
  21. package/Editor/InspectorState.cs.meta +2 -0
  22. package/Editor/Resources/Inspector/BoundEntityRootEditor.uss +28 -0
  23. package/Editor/Resources/Inspector/BoundEntityRootEditor.uss.meta +2 -0
  24. package/Editor/Resources/Inspector/SceneAuthoringEditor.uss +282 -0
  25. package/Editor/Resources/Inspector/SceneAuthoringEditor.uss.meta +12 -0
  26. package/Editor/Resources/Inspector/SceneAuthoringEditor.uxml +8 -0
  27. package/Editor/Resources/Inspector/SceneAuthoringEditor.uxml.meta +10 -0
  28. package/Editor/Resources/Inspector.meta +8 -0
  29. package/Editor/Resources.meta +8 -0
  30. package/Editor/SceneEntityInspectorView.cs +1103 -0
  31. package/Editor/SceneEntityInspectorView.cs.meta +2 -0
  32. package/Editor/SelectionProxy.cs +19 -0
  33. package/Editor/SelectionProxy.cs.meta +2 -0
  34. package/Editor/SelectionProxyBridge.cs +64 -0
  35. package/Editor/SelectionProxyBridge.cs.meta +2 -0
  36. package/Editor/SelectionProxyEditor.cs +33 -0
  37. package/Editor/SelectionProxyEditor.cs.meta +2 -0
  38. package/LICENSE.md +21 -0
  39. package/LICENSE.md.meta +7 -0
  40. package/README.md +66 -0
  41. package/README.md.meta +2 -0
  42. package/Runtime/AssemblyInfo.cs +3 -0
  43. package/Runtime/AssemblyInfo.cs.meta +2 -0
  44. package/Runtime/ComponentData.cs +120 -0
  45. package/Runtime/ComponentData.cs.meta +2 -0
  46. package/Runtime/DeltaECS.Unity.asmdef +14 -0
  47. package/Runtime/DeltaECS.Unity.asmdef.meta +7 -0
  48. package/Runtime/Editor.meta +8 -0
  49. package/Runtime/EntityAuthoring.cs +47 -0
  50. package/Runtime/EntityAuthoring.cs.meta +2 -0
  51. package/Runtime/EntityReference.cs +21 -0
  52. package/Runtime/EntityReference.cs.meta +2 -0
  53. package/Runtime/SceneAuthoring.cs +202 -0
  54. package/Runtime/SceneAuthoring.cs.meta +2 -0
  55. package/Runtime/SceneData.cs +120 -0
  56. package/Runtime/SceneData.cs.meta +2 -0
  57. package/Runtime/SceneWorld.cs +618 -0
  58. package/Runtime/SceneWorld.cs.meta +2 -0
  59. package/Runtime/ThrowHelpers.cs +44 -0
  60. package/Runtime/ThrowHelpers.cs.meta +2 -0
  61. package/package.json +31 -0
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: d1eaef73532544e909dd89ad4555baf1
@@ -0,0 +1,171 @@
1
+ using System;
2
+ using Delta.ECS;
3
+ using Unity.Hierarchy;
4
+ using UnityEditor;
5
+
6
+ namespace Delta.ECS.Unity.Editor
7
+ {
8
+ internal static class HierarchySelection
9
+ {
10
+ internal static EntityInspectorTarget Current { get; private set; }
11
+ internal static SceneAuthoring Authoring => Current.Authoring;
12
+ internal static string StableId => Current.StableId;
13
+ internal static SceneWorld RuntimeWorld => Current.RuntimeWorld;
14
+ internal static Entity RuntimeEntity => Current.RuntimeEntity;
15
+ internal static event Action Changed;
16
+
17
+ private static HierarchyNodeHandler _handler;
18
+ private static HierarchyNode _node;
19
+ private static HierarchyView _view;
20
+ private static bool _selectionCheckScheduled;
21
+
22
+ internal static void SetFromHierarchy(
23
+ HierarchyNodeHandler handler,
24
+ HierarchyView view,
25
+ SceneAuthoring authoring,
26
+ string stableId,
27
+ SceneWorld runtimeWorld,
28
+ Entity runtimeEntity,
29
+ HierarchyNode node)
30
+ {
31
+ bool changed = Current.Authoring != authoring
32
+ || !string.Equals(Current.StableId, stableId, StringComparison.Ordinal)
33
+ || Current.RuntimeWorld != runtimeWorld
34
+ || Current.RuntimeEntity != runtimeEntity;
35
+
36
+ Current = new EntityInspectorTarget(authoring, stableId, runtimeWorld, runtimeEntity);
37
+ _handler = handler;
38
+ _node = node;
39
+ _view = view;
40
+
41
+ if (changed)
42
+ {
43
+ Changed?.Invoke();
44
+ }
45
+ }
46
+
47
+ internal static void UpdateSelectedTarget(
48
+ HierarchyNodeHandler handler,
49
+ HierarchyNode node,
50
+ SceneAuthoring authoring,
51
+ string stableId,
52
+ SceneWorld runtimeWorld,
53
+ Entity runtimeEntity)
54
+ {
55
+ if (_handler != handler || _node != node)
56
+ {
57
+ return;
58
+ }
59
+
60
+ bool changed = Current.Authoring != authoring
61
+ || !string.Equals(Current.StableId, stableId, StringComparison.Ordinal)
62
+ || Current.RuntimeWorld != runtimeWorld
63
+ || Current.RuntimeEntity != runtimeEntity;
64
+ Current = new EntityInspectorTarget(authoring, stableId, runtimeWorld, runtimeEntity);
65
+ SelectionProxyBridge.UpdateTarget(handler, node, Current);
66
+ if (changed)
67
+ {
68
+ Changed?.Invoke();
69
+ }
70
+ }
71
+
72
+ internal static void Clear(HierarchyView view)
73
+ {
74
+ if (_view == view)
75
+ {
76
+ SetEmpty();
77
+ }
78
+ }
79
+
80
+ internal static void DeferClear(HierarchyView view)
81
+ {
82
+ if (_view == view)
83
+ {
84
+ ScheduleSelectionValidation();
85
+ }
86
+ }
87
+
88
+ internal static void ClearHandler(HierarchyNodeHandler handler)
89
+ {
90
+ if (_handler == handler)
91
+ {
92
+ SetEmpty();
93
+ }
94
+ }
95
+
96
+ internal static void ClearIfSelected(
97
+ HierarchyNodeHandler handler,
98
+ SceneAuthoring authoring,
99
+ string stableId)
100
+ {
101
+ if (_handler == handler && Authoring == authoring
102
+ && string.Equals(StableId, stableId, StringComparison.Ordinal))
103
+ {
104
+ SetEmpty();
105
+ }
106
+ }
107
+
108
+ internal static void ClearIfSelected(SceneWorld runtimeWorld, Entity runtimeEntity)
109
+ {
110
+ if (Current.RuntimeWorld == runtimeWorld && Current.RuntimeEntity == runtimeEntity)
111
+ {
112
+ SetEmpty();
113
+ }
114
+ }
115
+
116
+ internal static void RenameSelected(SceneAuthoring authoring, string stableId)
117
+ {
118
+ if (Authoring == authoring && string.Equals(StableId, stableId, StringComparison.Ordinal))
119
+ {
120
+ Changed?.Invoke();
121
+ }
122
+ }
123
+
124
+ private static void SetEmpty()
125
+ {
126
+ if (Authoring == null && string.IsNullOrEmpty(StableId))
127
+ {
128
+ _handler = null;
129
+ _node = default;
130
+ _view = null;
131
+ return;
132
+ }
133
+
134
+ Current = default;
135
+ _handler = null;
136
+ _node = default;
137
+ _view = null;
138
+ Changed?.Invoke();
139
+ }
140
+
141
+ private static void ScheduleSelectionValidation()
142
+ {
143
+ if (_selectionCheckScheduled)
144
+ {
145
+ return;
146
+ }
147
+
148
+ _selectionCheckScheduled = true;
149
+ EditorApplication.delayCall += ValidateHierarchySelection;
150
+ }
151
+
152
+ private static void ValidateHierarchySelection()
153
+ {
154
+ _selectionCheckScheduled = false;
155
+ if (_view == null)
156
+ {
157
+ return;
158
+ }
159
+
160
+ foreach (ref readonly HierarchyNode selectedNode in _view.ViewModel.EnumerateNodesWithFlags(HierarchyNodeFlags.Selected))
161
+ {
162
+ if (selectedNode == _node)
163
+ {
164
+ return;
165
+ }
166
+ }
167
+
168
+ SetEmpty();
169
+ }
170
+ }
171
+ }
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: d7f4c45d26784e3581934de656dab780
3
+ timeCreated: 1790675335
@@ -0,0 +1,220 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.Globalization;
4
+ using System.Linq;
5
+ using UnityEditor;
6
+ using UnityEngine;
7
+
8
+ namespace Delta.ECS.Unity.Editor
9
+ {
10
+ [FilePath("Library/InspectorState.asset", FilePathAttribute.Location.ProjectFolder)]
11
+ internal sealed class InspectorState : ScriptableSingleton<InspectorState>
12
+ {
13
+ private const string LegacyOrderPreferencePrefix = "DeltaEcs.Inspector.ComponentOrder.";
14
+ private const string LegacyCollapsePreferencePrefix = "DeltaEcs.Inspector.ComponentCollapsed.";
15
+
16
+ [Serializable]
17
+ private struct ComponentFoldout
18
+ {
19
+ public string Schema;
20
+ public bool Expanded;
21
+ }
22
+
23
+ [SerializeField] private List<string> _componentOrder = new();
24
+ [SerializeField] private List<ComponentFoldout> _componentFoldouts = new();
25
+
26
+ [NonSerialized] private bool _legacyOrderLoaded;
27
+ [NonSerialized] private Dictionary<ulong, int> _componentOrderIndices;
28
+
29
+ internal int GetComponentOrder(ulong schema)
30
+ {
31
+ EnsureLegacyOrderLoaded();
32
+ EnsureOrderIndices();
33
+ return _componentOrderIndices.TryGetValue(schema, out int index) ? index : int.MaxValue;
34
+ }
35
+
36
+ internal List<ulong> GetComponentOrderSnapshot()
37
+ {
38
+ EnsureLegacyOrderLoaded();
39
+ var order = new List<ulong>(_componentOrder.Count);
40
+ for (int i = 0; i < _componentOrder.Count; i++)
41
+ {
42
+ if (TryParseSchema(_componentOrder[i], out ulong schema))
43
+ {
44
+ order.Add(schema);
45
+ }
46
+ }
47
+
48
+ return order;
49
+ }
50
+
51
+ internal void SetComponentOrder(IEnumerable<ulong> schemas)
52
+ {
53
+ EnsureLegacyOrderLoaded();
54
+ var nextOrder = schemas
55
+ .Distinct()
56
+ .Select(schema => schema.ToString("X16", CultureInfo.InvariantCulture))
57
+ .ToList();
58
+
59
+ if (_componentOrder.SequenceEqual(nextOrder, StringComparer.Ordinal))
60
+ {
61
+ return;
62
+ }
63
+
64
+ _componentOrder = nextOrder;
65
+ _componentOrderIndices = null;
66
+ Save(true);
67
+ }
68
+
69
+ internal void EnsureComponentOrder(IEnumerable<ulong> schemas)
70
+ {
71
+ List<ulong> order = GetComponentOrderSnapshot();
72
+ HashSet<ulong> knownSchemas = order.ToHashSet();
73
+ bool changed = false;
74
+ foreach (ulong schema in schemas)
75
+ {
76
+ if (knownSchemas.Add(schema))
77
+ {
78
+ order.Add(schema);
79
+ changed = true;
80
+ }
81
+ }
82
+
83
+ if (changed)
84
+ {
85
+ SetComponentOrder(order);
86
+ }
87
+ }
88
+
89
+ internal bool MoveComponent(ulong schema, int direction, IReadOnlyList<ulong> visibleOrder)
90
+ {
91
+ List<ulong> order = GetComponentOrderSnapshot();
92
+ var visibleSchemas = visibleOrder.Distinct().ToList();
93
+ int index = visibleSchemas.IndexOf(schema);
94
+ int nextIndex = index + direction;
95
+ if (index < 0 || nextIndex < 0 || nextIndex >= visibleSchemas.Count)
96
+ {
97
+ return false;
98
+ }
99
+
100
+ (visibleSchemas[index], visibleSchemas[nextIndex]) = (visibleSchemas[nextIndex], visibleSchemas[index]);
101
+ var visibleSet = visibleSchemas.ToHashSet();
102
+ int nextVisibleIndex = 0;
103
+ for (int i = 0; i < order.Count && nextVisibleIndex < visibleSchemas.Count; i++)
104
+ {
105
+ if (visibleSet.Contains(order[i]))
106
+ {
107
+ order[i] = visibleSchemas[nextVisibleIndex++];
108
+ }
109
+ }
110
+
111
+ SetComponentOrder(order);
112
+ return true;
113
+ }
114
+
115
+ internal bool IsComponentExpanded(ulong schema)
116
+ {
117
+ int index = FindFoldout(schema);
118
+ if (index >= 0)
119
+ {
120
+ return _componentFoldouts[index].Expanded;
121
+ }
122
+
123
+ bool expanded = EditorPrefs.GetBool(GetLegacyCollapseKey(schema), true);
124
+ _componentFoldouts.Add(new ComponentFoldout { Schema = FormatSchema(schema), Expanded = expanded });
125
+ Save(true);
126
+ return expanded;
127
+ }
128
+
129
+ internal void SetComponentExpanded(ulong schema, bool expanded)
130
+ {
131
+ int index = FindFoldout(schema);
132
+ if (index >= 0)
133
+ {
134
+ ComponentFoldout foldout = _componentFoldouts[index];
135
+ if (foldout.Expanded == expanded)
136
+ {
137
+ return;
138
+ }
139
+
140
+ foldout.Expanded = expanded;
141
+ _componentFoldouts[index] = foldout;
142
+ }
143
+ else
144
+ {
145
+ _componentFoldouts.Add(new ComponentFoldout { Schema = FormatSchema(schema), Expanded = expanded });
146
+ }
147
+
148
+ Save(true);
149
+ }
150
+
151
+ private int FindFoldout(ulong schema)
152
+ {
153
+ string schemaText = FormatSchema(schema);
154
+ for (int i = 0; i < _componentFoldouts.Count; i++)
155
+ {
156
+ if (string.Equals(_componentFoldouts[i].Schema, schemaText, StringComparison.Ordinal))
157
+ {
158
+ return i;
159
+ }
160
+ }
161
+
162
+ return -1;
163
+ }
164
+
165
+ private void EnsureLegacyOrderLoaded()
166
+ {
167
+ if (_legacyOrderLoaded)
168
+ {
169
+ return;
170
+ }
171
+
172
+ _legacyOrderLoaded = true;
173
+ if (_componentOrder.Count > 0)
174
+ {
175
+ return;
176
+ }
177
+
178
+ string legacyOrder = EditorPrefs.GetString($"{LegacyOrderPreferencePrefix}{Application.dataPath}", string.Empty);
179
+ string[] schemas = legacyOrder.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
180
+ for (int i = 0; i < schemas.Length; i++)
181
+ {
182
+ if (TryParseSchema(schemas[i], out ulong schema))
183
+ {
184
+ _componentOrder.Add(FormatSchema(schema));
185
+ }
186
+ }
187
+
188
+ if (_componentOrder.Count > 0)
189
+ {
190
+ _componentOrderIndices = null;
191
+ Save(true);
192
+ }
193
+ }
194
+
195
+ private void EnsureOrderIndices()
196
+ {
197
+ if (_componentOrderIndices != null)
198
+ {
199
+ return;
200
+ }
201
+
202
+ _componentOrderIndices = new Dictionary<ulong, int>(_componentOrder.Count);
203
+ for (int i = 0; i < _componentOrder.Count; i++)
204
+ {
205
+ if (TryParseSchema(_componentOrder[i], out ulong schema))
206
+ {
207
+ _componentOrderIndices.TryAdd(schema, i);
208
+ }
209
+ }
210
+ }
211
+
212
+ private static string GetLegacyCollapseKey(ulong schema) =>
213
+ $"{LegacyCollapsePreferencePrefix}{Application.dataPath}:{FormatSchema(schema)}";
214
+
215
+ private static string FormatSchema(ulong schema) => schema.ToString("X16", CultureInfo.InvariantCulture);
216
+
217
+ private static bool TryParseSchema(string value, out ulong schema) =>
218
+ ulong.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out schema);
219
+ }
220
+ }
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: 4b1e9a56e74c4e8b9a6d3c1f0e2a7b5d
@@ -0,0 +1,28 @@
1
+ .deltaecs-bound-entity-foldout > .unity-foldout__toggle {
2
+ min-height: 22px;
3
+ -unity-font-style: bold;
4
+ }
5
+
6
+ .deltaecs-bound-entity-foldout > .unity-foldout__content {
7
+ padding-left: 0;
8
+ }
9
+
10
+ .deltaecs-unity-component-foldout {
11
+ margin-top: 1px;
12
+ margin-bottom: 1px;
13
+ border-top-width: 1px;
14
+ border-top-color: var(--unity-colors-inspector_titlebar-border_accent);
15
+ }
16
+
17
+ .deltaecs-unity-component-foldout > .unity-foldout__toggle {
18
+ min-height: 22px;
19
+ background-color: var(--unity-colors-inspector_titlebar-background);
20
+ }
21
+
22
+ .deltaecs-unity-component-foldout > .unity-foldout__toggle > .unity-foldout__text {
23
+ -unity-font-style: bold;
24
+ }
25
+
26
+ .deltaecs-unity-component-foldout > .unity-foldout__content {
27
+ padding-left: 0;
28
+ }
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: 5bb65147946940e88f56a792f5f08fbb
@@ -0,0 +1,282 @@
1
+ .ecs-inspector-root {
2
+ flex-grow: 1;
3
+ min-height: 0;
4
+ margin: 0;
5
+ padding: 0;
6
+ }
7
+
8
+ .ecs-bound-inspector .ecs-inspector-root {
9
+ flex-grow: 0;
10
+ }
11
+
12
+ .ecs-bound-inspector .ecs-component-list {
13
+ flex-grow: 0;
14
+ max-height: 480px;
15
+ }
16
+
17
+ .ecs-inspector-header,
18
+ .ecs-inspector-footer {
19
+ flex-shrink: 0;
20
+ padding-left: 5px;
21
+ padding-right: 5px;
22
+ }
23
+
24
+ .ecs-inspector-header {
25
+ padding-top: 8px;
26
+ padding-bottom: 8px;
27
+ padding-left: 8px;
28
+ padding-right: 8px;
29
+ }
30
+
31
+ .ecs-inspector-footer {
32
+ padding-bottom: 8px;
33
+ }
34
+
35
+ .ecs-component-list {
36
+ flex-grow: 1;
37
+ flex-shrink: 1;
38
+ min-height: 0;
39
+ margin: 0;
40
+ padding: 0;
41
+ }
42
+
43
+ .ecs-component-row {
44
+ width: 100%;
45
+ min-width: 0;
46
+ flex-direction: row;
47
+ align-items: stretch;
48
+ margin: 0;
49
+ padding: 0;
50
+ }
51
+
52
+ .ecs-component-list .unity-list-view__reorderable-handle {
53
+ width: 22px;
54
+ min-width: 22px;
55
+ flex-shrink: 0;
56
+ align-items: center;
57
+ justify-content: center;
58
+ margin: 0;
59
+ padding: 0;
60
+ background-color: var(--unity-colors-inspector_titlebar-background);
61
+ }
62
+
63
+ .ecs-component-list .unity-list-view__reorderable-item__container {
64
+ margin: 0;
65
+ padding: 0;
66
+ flex-grow: 1;
67
+ }
68
+
69
+ .ecs-component-list .unity-list-view__item,
70
+ .ecs-component-list .unity-list-view__item:hover,
71
+ .ecs-component-list .unity-list-view__item:selected {
72
+ background-color: transparent;
73
+ border-width: 0;
74
+ margin: 0;
75
+ }
76
+
77
+ .ecs-component-list .unity-list-view__reorderable-item,
78
+ .ecs-component-list .unity-list-view__reorderable-item:hover,
79
+ .ecs-component-list .unity-list-view__reorderable-item:selected {
80
+ border-bottom-width: 1px;
81
+ border-bottom-color: var(--unity-colors-inspector_titlebar-border_accent);
82
+ }
83
+
84
+ .ecs-component-list .ecs-add-component-row,
85
+ .ecs-component-list .ecs-add-component-row:hover,
86
+ .ecs-component-list .ecs-add-component-row:selected {
87
+ border-bottom-width: 0;
88
+ }
89
+
90
+ .ecs-component-list .ecs-component-last-bound-row,
91
+ .ecs-component-list .ecs-component-last-bound-row:hover,
92
+ .ecs-component-list .ecs-component-last-bound-row:selected {
93
+ border-bottom-width: 0;
94
+ }
95
+
96
+ .ecs-component-list .unity-list-view__reorderable-handle:hover {
97
+ background-color: var(--unity-colors-inspector_titlebar-background-hover);
98
+ }
99
+
100
+ .ecs-add-component-row > .unity-list-view__reorderable-handle {
101
+ display: none;
102
+ }
103
+
104
+ .ecs-entity-header {
105
+ margin-bottom: 4px;
106
+ }
107
+
108
+ .ecs-entity-title-row,
109
+ .ecs-entity-id-row {
110
+ flex-direction: row;
111
+ align-items: center;
112
+ min-height: 20px;
113
+ }
114
+
115
+ .ecs-entity-icon {
116
+ width: 18px;
117
+ height: 18px;
118
+ margin-right: 4px;
119
+ color: var(--unity-colors-label-text);
120
+ -unity-text-align: middle-center;
121
+ }
122
+
123
+ .ecs-entity-name,
124
+ .ecs-runtime-entity-name {
125
+ flex-grow: 1;
126
+ min-width: 0;
127
+ -unity-font-style: bold;
128
+ }
129
+
130
+ .ecs-entity-id-row {
131
+ margin-top: 4px;
132
+ }
133
+
134
+ .ecs-view-binding {
135
+ flex-direction: row;
136
+ align-items: center;
137
+ margin-top: 6px;
138
+ }
139
+
140
+ .ecs-view-binding > .ecs-value-field {
141
+ flex-grow: 1;
142
+ min-width: 0;
143
+ }
144
+
145
+ .ecs-view-binding > .unity-button {
146
+ margin-left: 4px;
147
+ }
148
+
149
+ .ecs-entity-metadata {
150
+ flex-grow: 1;
151
+ min-width: 0;
152
+ color: var(--unity-colors-label-text);
153
+ white-space: normal;
154
+ }
155
+
156
+ .ecs-runtime-id,
157
+ .ecs-schema-label,
158
+ .ecs-empty-component,
159
+ .ecs-unsupported-field {
160
+ margin-top: 4px;
161
+ color: rgb(174, 177, 183);
162
+ }
163
+
164
+ .ecs-component-card {
165
+ width: auto;
166
+ min-width: 0;
167
+ flex-grow: 1;
168
+ margin: 0;
169
+ padding: 0;
170
+ background-color: var(--unity-colors-window-background);
171
+ }
172
+
173
+ .ecs-component-card-header {
174
+ width: 100%;
175
+ height: 20px;
176
+ min-height: 20px;
177
+ max-height: 20px;
178
+ align-items: center;
179
+ margin: 0;
180
+ padding-top: 0;
181
+ padding-left: 5px;
182
+ padding-bottom: 0;
183
+ padding-right: 5px;
184
+ background-color: var(--unity-colors-inspector_titlebar-background);
185
+ }
186
+
187
+ .ecs-component-card-header:hover {
188
+ background-color: var(--unity-colors-inspector_titlebar-background-hover);
189
+ }
190
+
191
+ .ecs-component-title {
192
+ flex-grow: 1;
193
+ -unity-font-style: bold;
194
+ }
195
+
196
+ .ecs-component-body {
197
+ padding-top: 2px;
198
+ padding-bottom: 4px;
199
+ }
200
+
201
+ .ecs-value-field > .unity-base-field__label {
202
+ min-width: 96px;
203
+ flex-basis: 36%;
204
+ flex-shrink: 0;
205
+ margin-right: 4px;
206
+ }
207
+
208
+ .ecs-value-field > .unity-base-field__input {
209
+ min-width: 0;
210
+ flex-grow: 1;
211
+ }
212
+
213
+ .ecs-component-menu,
214
+ .ecs-component-remove {
215
+ width: 18px;
216
+ min-width: 18px;
217
+ max-width: 18px;
218
+ height: 18px;
219
+ min-height: 18px;
220
+ max-height: 18px;
221
+ flex-shrink: 0;
222
+ align-self: center;
223
+ margin: 0;
224
+ padding: 0;
225
+ -unity-text-align: middle-center;
226
+ color: var(--unity-colors-label-text);
227
+ background-color: transparent;
228
+ border-width: 0;
229
+ border-radius: 0;
230
+ }
231
+
232
+ .ecs-component-menu:hover,
233
+ .ecs-component-remove:hover {
234
+ background-color: var(--unity-colors-button-background-hover);
235
+ }
236
+
237
+ .ecs-component-menu:active,
238
+ .ecs-component-remove:active {
239
+ background-color: var(--unity-colors-button-background-pressed);
240
+ }
241
+
242
+ .ecs-component-menu {
243
+ align-items: center;
244
+ justify-content: center;
245
+ margin-right: 2px;
246
+ color: var(--unity-colors-label-text);
247
+ font-size: 13px;
248
+ }
249
+
250
+ .ecs-component-menu > .unity-toolbar-menu__text {
251
+ flex-grow: 1;
252
+ width: 100%;
253
+ height: 100%;
254
+ min-width: 0;
255
+ margin: 0;
256
+ padding: 0;
257
+ -unity-text-align: middle-center;
258
+ }
259
+
260
+ .ecs-component-menu-arrow {
261
+ display: none;
262
+ }
263
+
264
+ .ecs-component-menu .unity-toolbar-menu__arrow {
265
+ display: none;
266
+ }
267
+
268
+ .ecs-component-remove {
269
+ font-size: 14px;
270
+ }
271
+
272
+ .ecs-add-component {
273
+ width: 230px;
274
+ height: 24px;
275
+ align-self: center;
276
+ margin-top: 5px;
277
+ margin-bottom: 4px;
278
+ }
279
+
280
+ .ecs-delete-entity {
281
+ margin-top: 2px;
282
+ }