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

What problems could be causing parameters passed to [Command] to become null?

$
0
0
I seemed to have a weird problem where a GameObject becomes null when passed to a [Command].

Code (CSharp):
  1. public void CmdFunction(GameObject obj){
  2.     //obj == null
  3.     //Some other stuffs that can't be done when obj is null.
  4. }
I went to see what could be the issue of why "obj" is null, when it is clearly not. As in, I'm passing in a GameObject that was instantiated immediately before calling the [Command] function.

I only know a few things that could happen:
  1. When the...

What problems could be causing parameters passed to [Command] to become null?

Viewing all articles
Browse latest Browse all 16796

Trending Articles



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