InjectFix
InjectFix copied to clipboard
项目中,使用iFixInject,有个struct的数据拷贝没有成功执行
距离,大佬不理我,已经好久好久了
namespace IFix.Test { public struct NormalTest { public int structInt; public void CopyData(NormalTest data) { Debug.Log("CopyData data.structInt ===>" + data.structInt); structInt = data.structInt; Debug.Log("CopyData structInt ===>" + structInt); } }
//HelloworldCfg.cs里配置了这个类型
public class Calculator
{
public NormalTest StructTest;
//[IFix.Patch]
public void TestStructPatch(int idata)
{
//Debug.Log(" <color=red>PatchMode ==============================>> </color>");
NormalTest current;
current.structInt = idata;
Debug.Log(" <color=red>Before</color> ==============================>> " + StructTest.structInt);
StructTest.CopyData(current);
Debug.Log(" <color=red>After </color> ==============================>> " + StructTest.structInt);
}
}
