mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-03-10 07:44:57 +08:00
fix: implement ResolveReferences for reactive objects (#1019)
Closes: #996
This commit is contained in:
parent
c2b381c721
commit
eb5a04511d
@ -31,9 +31,10 @@ using VRC.SDKBase;
|
|||||||
|
|
||||||
namespace nadena.dev.modular_avatar.core
|
namespace nadena.dev.modular_avatar.core
|
||||||
{
|
{
|
||||||
/**
|
/// <summary>
|
||||||
* This abstract base class is injected into the VRCSDK avatar component allowlist to avoid
|
/// This class is used internally by Modular Avatar for common operations between MA components. It should not be
|
||||||
*/
|
/// inherited by user classes, and will be removed in Modular Avatar 2.0.
|
||||||
|
/// </summary>
|
||||||
[DefaultExecutionOrder(-9999)] // run before av3emu
|
[DefaultExecutionOrder(-9999)] // run before av3emu
|
||||||
public abstract class AvatarTagComponent : MonoBehaviour, IEditorOnly
|
public abstract class AvatarTagComponent : MonoBehaviour, IEditorOnly
|
||||||
{
|
{
|
||||||
|
@ -39,5 +39,13 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
get => m_objects;
|
get => m_objects;
|
||||||
set => m_objects = value;
|
set => m_objects = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void ResolveReferences()
|
||||||
|
{
|
||||||
|
foreach (var obj in m_objects)
|
||||||
|
{
|
||||||
|
obj.Object?.Get(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,5 +22,13 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
get => m_objects;
|
get => m_objects;
|
||||||
set => m_objects = value;
|
set => m_objects = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void ResolveReferences()
|
||||||
|
{
|
||||||
|
foreach (var obj in m_objects)
|
||||||
|
{
|
||||||
|
obj.Object?.Get(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -65,5 +65,10 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
get => m_shapes;
|
get => m_shapes;
|
||||||
set => m_shapes = value;
|
set => m_shapes = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void ResolveReferences()
|
||||||
|
{
|
||||||
|
m_targetRenderer?.Get(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user