Files
BABA_YAGA/Assets/Scripts/Player/Generic/Utils/vSetParentOfController.cs

22 lines
516 B
C#
Raw Permalink Normal View History

2026-05-30 09:16:35 +07:00
using Invector.vCharacterController;
using UnityEngine;
namespace Invector.Utils
{
public class vSetParentOfController : MonoBehaviour
{
[vHelpBox("Set this GameObject as parent of the Controller")]
private vThirdPersonController cc;
public UnityEngine.Events.UnityEvent onStart;
private void Start()
{
cc = GetComponentInParent<vThirdPersonController>();
transform.parent = cc.transform;
onStart.Invoke();
}
}
}