Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Command object references

$
0
0
Reading the documentation, it's not clear to me which object references I should be able to pass around in commands. Can I pass any part (the gameobject itself, component) of a spawned object in a command? Do the have to be NetworkBehaviours?

Code (CSharp):
  1. [Command]
  2. void CmdDoSomething(GameObject obj)
  3. {
  4.     // do something
  5. }
  6. [Command]
  7. void CmdDoSomething2(MyScriptAttachedToASpawnedObject obj)
  8. {
  9.     // do something
  10. }
  11.  
I'm experiencing some problems with it and I don't understand if...

Command object references

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>