So I am writing the SceneLoader Script in Visual Studio. But VS does not seem to recognise any Unity Commands, in the sense that there are NO unity suggestions at all, only C# suggestions, I can naturally write out the code without the VS Suggestions, and that IS accepted by VS, as in there are no reported errors.
For example when I write us VS suggests using, but when I proceed to write UnityEngine.SceneManagement there are no suggestions from VS, I have to write everything.
When I go back to Unity and add the SceneLoader.cs to the Start Button, I can select MonoScript > string name. Where its literally only offering “string name” and No other options.
I have tried on my Laptop and get the exact same behaviour.
I have uninstalled and then reinstalled the “Game development with Unity” workload in VS, but that did not help.
Unity Version 2019.3.15f1
VS Version 16.6.1
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneLoader : MonoBehaviour
{
public void LoadNextScene()
{
int currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
SceneManager.LoadScene(currentSceneIndex + 1);
}
}