🍔效果
保持两个非父子关系的物体坐标、旋转相对静止
🥪食用
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ZYF
{
public class KeepRelativeRestDemo : MonoBehaviour
{
public GameObject asChild;
public GameObject asParent;
private void OnEnable()
{
asChild.AddKeepRelativeRestBind(asParent);
}
private void OnDisable()
{
asChild.RemoveKeepRelativeRestBind();
}
}
}