mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-31 02:32:53 +08:00
fix: previewing Material Setter targets Renderers other than MeshRenderer and SkinnedMeshRenderer cause error (#1053)
This commit is contained in:
parent
ea857406ee
commit
f9abb5c4fc
@ -65,6 +65,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
{
|
||||
var target = prop.TargetProp;
|
||||
if (target.TargetObject is not Renderer r || r == null) continue;
|
||||
if (target.TargetObject is not MeshRenderer and not SkinnedMeshRenderer) continue;
|
||||
if (!target.PropertyName.StartsWith(PREFIX)) continue;
|
||||
|
||||
var index = int.Parse(target.PropertyName.Substring(PREFIX.Length, target.PropertyName.IndexOf(']') - PREFIX.Length));
|
||||
|
Loading…
Reference in New Issue
Block a user