Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: j0k on March 17, 2017, 10:10:08 AM

Title: Complex Object Sending
Post by: j0k on March 17, 2017, 10:10:08 AM
Good day, @ll

I didn't find the answer to my question here. Is it possible to share a complex GameObject via TNet 3.0.x?

I still didn't check the third version of TNet but tried one old version 1.9. Example 1 , 2, 3 contains drugging Boxes scenarious. But when I put for example complex object like ThirdPersonCharacter from Standard Asset  it's not easy to share it via TNObject in one click. Is it possible in last version?



Title: Re: Complex Object Sending
Post by: cmifwdll on March 21, 2017, 04:52:55 AM
What do you mean by "share"? "Complex" objects are still just objects in the eyes of TNet. I recommend going through the tutorials: http://www.tasharen.com/forum/index.php?topic=13953.0 these tutorials will prove helpful even if you're using an older version; though the code samples won't match up perfectly, you'll gain an understanding of how TNet works.
Title: Re: Complex Object Sending
Post by: ArenMook on March 21, 2017, 04:47:03 PM
You can't send Unity objects via an RFC call, if that's what you're asking. You have to serialize their properties instead, and send those. TNet is able to serialize anything marked with [System.Serializable], but Unity's components are not.
Title: Re: Complex Object Sending
Post by: j0k on March 24, 2017, 11:29:15 AM
Ok, I undertand now. There is no example in basic TNet with such complex object as Ethan (from Standard Asset Pack) so I asked about it. No I see that it can be sended will with TNet usage if all TNet details will be catched)