Update
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user