15 lines
360 B
C#
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);
|
|
}
|
|
}
|
|
} |