Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Third Party Problem with PhotonNetwork.Instantiate

Discussion in 'Multiplayer' started by gurman22788, Apr 30, 2023.

  1. gurman22788


    Feb 3, 2023
    I want to implement a character selection system and
    upload it to the stage. I created prefabs and threw them into the list, then into PhotonNetwork.Instantiate specified the player and his ID. I'm working with multiplayer for the first time and I don't fully understand how PhotonNetwork works.Instantiate only with prefabs directly or can extract them from arrays and lists on its own, help with the problem, I will be very grateful.
    upload_2023-4-30_21-26-19.png upload_2023-4-30_21-27-13.png upload_2023-4-30_21-27-39.png upload_2023-4-30_21-28-31.png
  2. tobiass


    Apr 7, 2009
    PUN instantiation is the same as Unity's but it is networked. You instantiate prefabs with PhotonViews on, which then identify and run the networking per object.
    It is a bit much to explain here but there is a tutorial for PUN 2, which you should check out. It covers instantiation and some pitfalls of that, too. Networking is something that is hard to get right without learning about it before you start.