Hi there, I’m having trouble compiling once I added this script…
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
Rigidbody2d rgbd;
// Start is called before the first frame update
void Start()
{
rgbd = GetComponent<Rigidbody2d>();
}
// Update is called once per frame
void Update()
{
}
}
The error message is:
Assets\Scripts\PlayerController.cs(7,5): error CS0246: The type or namespace name ‘Rigidbody2d’ could not be found (are you missing a using directive or an assembly reference?)
I think visual studio code updated last night. I wonder if a path or reference got messed up, but I don’t know where to look. Thanks!
edit: It seems to be fixed. I went back to the the “Intellisense issues” topic and the Omnisharp:select project thing from VS Code seems to have done the trick. I guess I’ll leave this up in case anyone else has the same problem.