Files
BABA_YAGA/Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/Generic/Utils/vRemoveParent.cs
2026-05-30 09:16:35 +07:00

24 lines
407 B
C#

using UnityEngine;
public class vRemoveParent : MonoBehaviour
{
public bool removeOnStart = true;
private void Start()
{
if (removeOnStart)
{
RemoveParent();
}
}
public void RemoveParentOfOtherTransform(Transform target)
{
target.SetParent(null);
}
public void RemoveParent()
{
transform.SetParent(null);
}
}