mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
0a6270bb43
Closes: #1037
23 lines
726 B
C#
23 lines
726 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace nadena.dev.modular_avatar.core
|
|
{
|
|
[AddComponentMenu("Modular Avatar/MA Replace Object")]
|
|
[DisallowMultipleComponent]
|
|
[HelpURL("https://modular-avatar.nadena.dev/docs/reference/replace-object?lang=auto")]
|
|
public class ModularAvatarReplaceObject : AvatarTagComponent, IHaveObjReferences
|
|
{
|
|
public AvatarObjectReference targetObject = new AvatarObjectReference();
|
|
|
|
public override void ResolveReferences()
|
|
{
|
|
targetObject?.Get(this);
|
|
}
|
|
|
|
public IEnumerable<AvatarObjectReference> GetObjectReferences()
|
|
{
|
|
if (targetObject != null) yield return targetObject;
|
|
}
|
|
}
|
|
} |