How do i PhotonNetwork.Instantiate with just a single paramter? aka with a finished gameobject

What im trying to do is basicly this:
PhotonNetwork.Instantiate(myDotList.Add((GameObject)Instantiate(myDotPrefab, mousePoint, Quaternion.identity)));

I have a list of gos that needs to be in a list to work properly. It works perfectly like this in my offline version but im now trying to network these objects and im not sure how to do it since PhotonNetwork.Instantiate dont work when i do above.

Thanks in advance!

Comments

  • N1warheadN1warhead
    edited August 2017
    As they say, the devil is in the details.
    Look at what you're typing "PhotonNetwork.Instantiate(myDotList.Add"

    What would not only be easier to read, but more proper, would be this.
    GameObject newObj = PhotonNetwork.Instantiate(GameObject, mousePoint,Quaternion.identity);
    myDotList.Add(newObj);

    // Whatever else...


    No idea why you're even attempting to Instantiate two things at once in the same line.
Sign In or Register to comment.