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;
}
}