Author Topic: Best way to send object reference?  (Read 1731 times)

Manmax75

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 32
    • View Profile
Best way to send object reference?
« on: April 15, 2014, 10:46:44 PM »
Hey there, I need to send an object to my CreateEx function, but Transforms and GameObjects don't serialize, so what's the best way to send an object reference so I can look it up locally?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Best way to send object reference?
« Reply #1 on: April 16, 2014, 11:26:53 AM »
You can't send a game object. How would you serialize an entire game object? Instead send some identifier that will make it possible to get the game object on the other side. Path to where it is in the Resources folder so it can be retrieved via Resources.Load, for example. All game objects must already exist on all clients.