mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-24 09:08:23 -05:00
21 lines
446 B
C#
21 lines
446 B
C#
using UnityEngine;
|
|
using UnityAtoms.BaseAtoms;
|
|
|
|
namespace UnityAtoms.Examples
|
|
{
|
|
/// <summary>
|
|
/// Script to sync the Vector3 Variable with this GameObject's current position.
|
|
/// </summary>
|
|
public class SyncPositionWithVariable : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Vector3Reference _reference;
|
|
|
|
void LateUpdate()
|
|
{
|
|
_reference.Value = transform.position;
|
|
}
|
|
}
|
|
}
|
|
|