Search Unity

  1. We have added dedicated sub-forums for UNet, the experimental MLAPI and Unity Transport Package. Please use the new forums to discuss related topics.
    Dismiss Notice
  2. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

Error with Photon

Discussion in 'Multiplayer' started by Aapje303, Jul 22, 2021.

  1. Aapje303


    Jul 22, 2021
    Never mind figured it out.

    Hello, I'm following this tutorial:

    And I get an error that I can't seem to solve
    "The name 'roomListContent does not exist in the current context"

    This is the code that doesn't work:

    Code (CSharp):
    1.     public override void OnRoomListUpdate(List<RoomInfo> roomList)
    2.     {
    3.         for(int i = 0; i < roomList.Count; i++)
    4.         {
    5.             Instantiate(roomListItemPrefab, roomListContent).GetCompontent<RoomListItem>().SetUp(roomList[i]);
    6.         }
    7.     }
    8. }
    Last edited: Jul 22, 2021