I just started game development and got into a problem whenever I load my Visual Studio code into Unity it says The refrenced script unknown on this behaviour is missing
This is my script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VirtualManMovement : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Debug.Log("Hello, World!") ;
}
// Update is called once per frame
void Update()
{
}
}
I need a solution for this
CodePudding user response:
This may happen is the file name does not match the class name. Make sure that the file containing this script is also named VirtualManMovement.cs
CodePudding user response:
- Make sure in Unity you go to edit -> preferences and see that you have Unity External tools in Your IDE Selected.
- Ensure your Code File Name is the same as your Class to prevent confusion.
I was confused as well when I first started. Hopefully, you find this useful