This is the error I received;
Code: Select all
I/Unity ( 7355): InvalidCastException: Cannot cast from source type to destination type.
I/Unity ( 7355): at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.EncodeObject (Sfs2X.Util.ByteArray buffer, Int32 typeId, System.Object data) [0x00000] in <filename unknown>:0
I/Unity ( 7355): at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.Obj2bin (ISFSObject obj, Sfs2X.Util.ByteArray buffer) [0x00000] in <filename unknown>:0
I/Unity ( 7355): at Sfs2X.Protocol.Serialization.DefaultSFSDataSerializer.Object2Binary (ISFSObject obj) [0x00000] in <filename unknown>:0
I/Unity ( 7355): at Sfs2X.Entities.Data.SFSObject.ToBinary () [0x00000] in <filename unknown>:0
I/Unity ( 7355): at Sfs2X.Entities.Data.SFSObject.GetHexDump () [0x00000] in <filename unknown>:0
I/Unity ( 7355): at Sfs2X.Core.SFSProtocolCodec.OnPacketWrite (IMessage message) [0x00000] in <filename unknown>:0
I/Unity ( 7355): at Sfs2X.Bitswarm.BitSwarmClient.Send (IMessage message) [0x00000] in <filename unknown>:0
I/Unity ( 7355): at Sfs2X.SmartFox.Send (IRequest request) [0x00000] in <filename unknown>:0
I/Unity ( 7355): at GameManager.OnReturnToGames () [0x00000] in <filename unknown>
Code: Select all
if (smartFox.IsConnected) {
smartFox.Send(new ExtensionRequest("OnLeavingRoom", new SFSObject(), smartFox.LastJoinedRoom));
smartFox.Send(new LeaveRoomRequest());
LeaveRoom();
}