static void OnInitCallback(byte t, IntPtr ptr) { string command = Marshal.PtrToStringAnsi(ptr); switch (t) { case ASCII.L: XDebug.CLog(command); break; case ASCII.W: XDebug.CWarn(command); break; case ASCII.E: XDebug.CError(command); break; case ASCII.G: GameObject go = XResources.Load <GameObject>(command, AssetType.Prefab); go.name = command; break; case ASCII.U: XDebug.CLog("unload: " + command); break; default: XDebug.LogError(t + " is not parse symbol: " + command); break; } }