Author Topic: Complex Object Sending  (Read 280 times)

j0k

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Complex Object Sending
« 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?




cmifwdll

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 77
  • Posts: 140
  • TNet Alchemist
    • View Profile
Re: Complex Object Sending
« Reply #1 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 270
  • -Receive: 1132
  • Posts: 21,846
  • Toronto, Canada
    • View Profile
Re: Complex Object Sending
« Reply #2 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.

j0k

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Complex Object Sending
« Reply #3 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)