在下面的例子中,我希望得到输出“rigsBeingPhasedIn”,而不是“rigdiction”(本地引用变量的名称)。
private static Dictionary<Rig, Coroutine> rigsBeingPhasedIn = new Dictionary<Rig, Coroutine>();
// the below static method is called by a public facing method
private static void StopRigBeingPhased(Rig rig, ref Dictionary<Rig, Coroutine> rigDictionary)
{
Debug.Log($"{nameof(rigDictionary)}"); // outputs "rigDictionary"
}
public static void PhaseRigOut(Rig rig, float duration, float targetWeight) {
// ...
StopRigBehingPhased(rig, ref rigsBeingPhasedIn);
// ...
}
谢谢你的时间!