You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
524 B
C#
24 lines
524 B
C#
2 months ago
|
using UnityEngine;
|
||
|
|
||
|
namespace Unity.Multiplayer.Samples.BossRoom
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Class which registers a transform to an associated TransformVariable ScriptableObject.
|
||
|
/// </summary>
|
||
|
public class TransformRegister : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField]
|
||
|
TransformVariable m_TransformVariable;
|
||
|
|
||
|
void OnEnable()
|
||
|
{
|
||
|
m_TransformVariable.Value = transform;
|
||
|
}
|
||
|
|
||
|
void OnDisable()
|
||
|
{
|
||
|
m_TransformVariable.Value = null;
|
||
|
}
|
||
|
}
|
||
|
}
|