void Awake() { NativePipe.RegisterCallback(NativePipeMessageType.F, (c, h, o, v) => { Utils.NativeLMSLog(string.Format("ReceivedMessage, type F({0},{1},{2},{3})", c, h, o, v)); GetHack(c, h).ReceiveMessageF(o, (float)v[0]); }); NativePipe.RegisterCallback(NativePipeMessageType.I, (c, h, o, v) => { Utils.NativeLMSLog(string.Format("ReceivedMessage, type I({0},{1},{2},{3})", c, h, o, v)); GetHack(c, h).ReceiveMessageI(o, (int)v[0]); }); NativePipe.RegisterCallback(NativePipeMessageType.B, (c, h, o, v) => { Utils.NativeLMSLog(string.Format("ReceivedMessage, type B({0},{1},{2},{3})", c, h, o, v)); GetHack(c, h).ReceiveMessageB(o, (bool)v[0]); }); unsafe { NativePipe.RegisterCallback(NativePipeMessageType.PFPF, (c, h, o, v) => { PFPF pfpf = (PFPF)v[0]; GetHack(c, h).ReceiveMessagePFPF(o, pfpf.PF1, pfpf.PF2); }); NativePipe.RegisterCallback(NativePipeMessageType.PB, (c, h, o, v) => { }); } }