So I’m working on a online multiplayer game, but for some reason I can’t get VS to identify everyday unity classes and object:
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Remoting.Channels;
using UnityEngine;
using UnityEngine.UI;
public class UIManager : MonoBehaviour
{
public static UIManager instance;
public GameObject startMenu;
public InputField usernameField;
private void Awake()
{
if (instance == null)
{
instance = this;
}
else if (instance != null)
{
Debug.Log("Instance already exists, destroying instance...");
Destroy(this);
}
}
public void ConnectToServer()
{
startMenu.SetActive(false);
usernameField.interactable=false;
Client.instance.ConnectToServer();
}
}
I dont know if this is happening to anyone else, but the GameObject and InputField, aren’t being assigned properly. Help please.