The materials used to be displayed in the inspector but now it’s just InstanceId. Where is this placed now?
It’s bugged at present
1 Like
I just wrote custm inspector for them long time ago and never had issues
using JetBrains.Annotations;
using Unity.Entities;
using Unity.Entities.UI;
using UnityEditor.Search;
using UnityEngine;
using UnityEngine.UIElements;
namespace Door407.DOTS.Core.Editor.PropertyInspectors
{
internal class UnityObjectRefInspector<T> : PropertyInspector<UnityObjectRef<T>> where T : Object
{
public override VisualElement Build()
{
var value = Target.Value;
var name = value == null ? DisplayName : $"{value.name}";
var foldout = new Foldout
{
text = name,
value = false
};
var id = new IntegerField("Instance Id")
{
value = Target.Id.instanceId
};
var of = new ObjectField
{
value = Target.Value
};
foldout.Add(id);
foldout.Add(of);
return foldout;
}
}
[UsedImplicitly]
internal class MaterialUnityObjectRefInspector : UnityObjectRefInspector<Material>
{
}
[UsedImplicitly]
internal class MeshUnityObjectRefInspector : UnityObjectRefInspector<Mesh>
{
}
[UsedImplicitly]
internal class ComputeShaderUnityObjectRefInspector : UnityObjectRefInspector<ComputeShader>
{
}
}
1 Like
Awesome! Thanks.