com.artromskiy.deltaecs.unity 0.0.63 → 0.0.64
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.
- package/CHANGELOG.md +4 -0
- package/Editor/ComponentDropdown.cs +0 -1
- package/Editor/SceneEntityInspectorView.cs +12 -12
- package/README.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -34,6 +34,8 @@ namespace Delta.ECS.Unity.Editor
|
|
|
34
34
|
internal int ComponentCount => _componentEntries.Count;
|
|
35
35
|
private SceneAuthoring Authoring => _target.Authoring;
|
|
36
36
|
|
|
37
|
+
private ComponentRegistry Components => (_target.IsRuntime ? _target.RuntimeWorld : _previewWorld).World.Components;
|
|
38
|
+
|
|
37
39
|
public SceneEntityInspectorView(SelectionProxy proxy)
|
|
38
40
|
: this(() => proxy != null ? proxy.Target : default)
|
|
39
41
|
{
|
|
@@ -190,18 +192,6 @@ namespace Delta.ECS.Unity.Editor
|
|
|
190
192
|
|
|
191
193
|
private static Label CreateEntityIcon() => CreateClassLabel("◆", "ecs-entity-icon");
|
|
192
194
|
|
|
193
|
-
private ComponentRegistry Components => (_target.IsRuntime ? _target.RuntimeWorld : _previewWorld).World.Components;
|
|
194
|
-
|
|
195
|
-
private ComponentId? TryGetComponentId(ComponentData data)
|
|
196
|
-
=> _previewWorld.TryGetComponentId(data, out ComponentId componentId) ? componentId : null;
|
|
197
|
-
|
|
198
|
-
private string GetComponentMenuPath(ComponentId componentId)
|
|
199
|
-
{
|
|
200
|
-
string namespacePath = Components.GetComponentType(componentId).Namespace?.Replace('.', '/') ?? string.Empty;
|
|
201
|
-
string shortName = GetShortTypeName(Components.GetComponentType(componentId));
|
|
202
|
-
return string.IsNullOrEmpty(namespacePath) ? shortName : $"{namespacePath}/{shortName}";
|
|
203
|
-
}
|
|
204
|
-
|
|
205
195
|
private static string GetShortTypeName(Type type)
|
|
206
196
|
{
|
|
207
197
|
string name = type.Name;
|
|
@@ -223,6 +213,16 @@ namespace Delta.ECS.Unity.Editor
|
|
|
223
213
|
private static int GetComponentOrder(ulong schema) =>
|
|
224
214
|
InspectorState.instance.GetComponentOrder(schema);
|
|
225
215
|
|
|
216
|
+
private ComponentId? TryGetComponentId(ComponentData data)
|
|
217
|
+
=> _previewWorld.TryGetComponentId(data, out ComponentId componentId) ? componentId : null;
|
|
218
|
+
|
|
219
|
+
private string GetComponentMenuPath(ComponentId componentId)
|
|
220
|
+
{
|
|
221
|
+
string namespacePath = Components.GetComponentType(componentId).Namespace?.Replace('.', '/') ?? string.Empty;
|
|
222
|
+
string shortName = GetShortTypeName(Components.GetComponentType(componentId));
|
|
223
|
+
return string.IsNullOrEmpty(namespacePath) ? shortName : $"{namespacePath}/{shortName}";
|
|
224
|
+
}
|
|
225
|
+
|
|
226
226
|
private void OnEntitySelectionChanged()
|
|
227
227
|
{
|
|
228
228
|
SyncSelection();
|
package/README.md
CHANGED