Photon Unity Networking: Warning CS0436

Hello all,

I’ve added the Photon package to my project, including the tutorials, and I am getting this warning on pretty much all of the tutorials:

Assets/Photon Unity Networking/MarcoPolo-Tutorial/Monstergame/Resources/Scripts/myThirdPersonController.cs(2,40): warning CS0436: The type `ThirdPersonController' conflicts with the imported type `ThirdPersonController'. Ignoring the imported type definition

and another:

Assets/Photon Unity Networking/DemoWorker/Scripts/Game/Player/ThirdPersonController.cs(31,12): warning CS0436: The type `CharacterState' conflicts with the imported type `CharacterState'. Ignoring the imported type definition

and another:

Assets/Photon Unity Networking/DemoWorker/Scripts/Game/Player/ThirdPersonNetwork.cs(6,5): warning CS0436: The type `ThirdPersonCamera' conflicts with the imported type `ThirdPersonCamera'. Ignoring 
the imported type definition

There’s more, but it’s all the same warning, just different classes.

Googling the error code yields some answers on MSDN but I didn’t really understand what they meant by VS getting confused by references to the project and that removing all the references to the project and re-adding them fixes it on Visual Studio. (I’m not in VS, I’m in Unity.)

Anyone have a clue? It’s not a huge deal. I’m just sick of my console being filled with warnings. Once I’m done with the tutorials I’ll delete them, but that won’t be for a long while.

This type of question belongs in the Multiplayer Networking section, because well, it deals with networking :P.

But the reason your’e getting that is because you’ve simply defined the type ‘ThirdPersonCamera’ more than once.

So basically you imported the Photon Assets which contained ‘ThirdPersonCamera’ but you already had a ‘ThirdPersonCamera’ in your project.

Thanks for the quick response. Even if Photon is for networking, my error isn’t related to networking, is it? :stuck_out_tongue:

But anyways, much appreciated! Thanks again.

I guess it’s technically not :P!

Haha, it’s no big deal anyways.

Glad I could help.

Hmmmm. I’m still stuck with one of these warnings I’m not sure about.

Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs(73,12): warning CS0436: The type `Room' conflicts with the imported type `Room'. Ignoring the imported type definition

Here’s the location of the warning in NetworkingPeer.cs:

    public Room mCurrentGame
	{
        get
        {
            if (this.mRoomToGetInto != null  this.mRoomToGetInto.isLocalClientInside)
            {
                return this.mRoomToGetInto;
            }

            return null;
        }
    }

The class Room is declared in another file Room.cs. It seems to think that this is redefining the class? Maybe it doesn’t like the accessors?

It’s the same thing as before, its just declared twice.

Agh, thanks again. It was UnitySerializer using the name Room as well as Photon. Problem solved.