Files
Hasebe/Assets/Code/Infrastructure/Audio/AudioSourceFollower.cs
2026-09-20 15:26:03 +03:00

15 lines
360 B
C#

using System;
using UnityEngine;
namespace Code.Infrastructure.Audio
{
public class AudioSourceFollower : MonoBehaviour
{
[NonSerialized]
public Transform FollowTarget;
private void Update()
{
if(FollowTarget) transform.SetPositionAndRotation(FollowTarget.position, FollowTarget.rotation);
}
}
}