Error CS0030 Cannot convert type `UnityEngine.Networking.PlayerController' to `PlayerController123',CS0030: Space Shooter Tutorial

So I am doing the space shooter tutorial and I am on the 5th video at 7:03 and I keep getting Assets/Lobby/Scripts/Lobby/LobbyManager.cs(266,59): error CS0030: Cannot convert type UnityEngine.Networking.PlayerController to PlayerController

I saw one solution that said to change PlayerController to PlayerController123. I did that and I am now getting Assets/Lobby/Scripts/Lobby/LobbyManager.cs(266,59): error CS0030: Cannot convert type UnityEngine.Networking.PlayerController to PlayerController123

I am at a loss because after doing some research online it seems to be an error for multiplayer games (well it’s more commonly seen in multiplayer games).

Anyways here is my code so far:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController123 : MonoBehaviour
{
    private Rigidbody rb;

    private void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    private void FixedUpdate()
    {
    float moveHorizontal = Input.GetAxis("Horizontal");
    float moveVertical = Input.GetAxis("Vertical");

    Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
    rb.velocity = movement;
    }
}

I need help with this same problem–Thanks!

HI @Ryanb360
I had the same problem with Space Shooter tutorial video, same time.
I searched the error message and found this page indicating the problem is with two scripts with the same name causing conflicts and to reference the script using the full namespace.

I’m completely new to Unity but willing to have a go, so I replaced “PlayerController” with “UnityEngine.Networking.PlayerController” in:

  • LobbyManager.cs (line 266)
  • LobbyPlayer.cs (line 147)

Don’t know if it the rest of the tutorial will work, but the errors disappeared, so I will continue onward.