The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Trouble with Fusion Tutorial 102: does not implement interface

MuKapp
2022-05-28 23:15:52

I'm learning Fusion but having trouble with Tutorial part 102, which creates a basic multiplayer spawner. I added the code as written but I've been running into some unexpected errors. The code is pasted below:

using Fusion; // I added this, although it was not listed in the tutorial

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using System;

public class BasicSpawner : MonoBehaviour, INetworkRunnerCallbacks

{

}

The errors that I received on this were the following:

Assets/BasicSpawner.cs(17,55): error CS0246: The type or namespace name 'NetAddress' could not be found (are you missing a using directive or an assembly reference?)

Assets/BasicSpawner.cs(17,81): error CS0246: The type or namespace name 'NetConnectFailedReason' could not be found (are you missing a using directive or an assembly reference?)

Assets/BasicSpawner.cs(7,44): error CS0535: 'BasicSpawner' does not implement interface member 'INetworkRunnerCallbacks.OnConnectFailed(NetworkRunner, NetAddress, NetConnectFailedReason)'

Could anyone please help me figure out what's happening? I tried reinstalling the latest stable version of Fusion. I'm using Unity version 2021.3.2f1 on MacOS M1

Comments

MuKapp
2022-05-30 00:04:47

Please ignore-- I referred to the downloadable example code. The error was that I missed some necessary "using" statements.

Back to top