Search Unity

Error after following tutorial

Discussion in 'Multiplayer' started by Deleted User, Jan 24, 2020.

  1. Deleted User

    Deleted User

    Guest


    This is the tutorial I was following.
    I followed the exact steps in the tutorial and still got these 4 errors
    Assets\Scripts\ServerMenu.cs(22,45): error CS0246: The type or namespace name 'Map<,>' could not be found (are you missing a using directive or an assembly reference?)
    Assets\Scripts\ServerMenu.cs(22,49): error CS0246: The type or namespace name 'Guid' could not be found (are you missing a using directive or an assembly reference?)
    Assets\Scripts\ServerMenu.cs(22,55): error CS0246: The type or namespace name 'UdpSession' could not be found (are you missing a using directive or an assembly reference?)
    Assets\Scripts\ServerMenu.cs(22,26): error CS0115: 'ServerMenu.SessionListUpdated(Map<Guid, UdpSession>)': no suitable method found to override
    On line 22 it just says this:
    public override void SessionListUpdated(Map<Guid, UdpSession> sessionList)
    I'm using Photon BOLT to get multiplayer
     
  2. ramonmelo

    ramonmelo

    Joined:
    May 16, 2018
    Posts:
    2
    Hello!

    Make sure you are importing all necessary namespaces to make your script to work properly.
    For your case, you should be missing the
    UdpKit
    namespace;

    Your import list should be similar to this one:

    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UdpKit;
    5. using UnityEngine;