I’ve got VS 2017 installed and it mostly seems to work with Unity, but I’m wondering, is it necessary to install Visual Studio Tools for Unity with 2019? I’m new to VS and come from Java. I have a very simple script, yet, it only seems to work partly; for instance, I’m trying to load a scene, and from the doc, SceneManager.LoadScene(“Scene2”); seems like it should have worked, but it gives me a ‘SceneManager does not exist in the current context’ error… Yet, UnityEngine.SceneManagement.SceneManager. works.
Am I missing something in VS? Import issue? I’d have expected VS’s autocomplete to find SceneManager, yet it does not… Other reason? Thanks!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PuzzleSceneLoader: MonoBehaviour {
void Start() {
// SceneManager.LoadScene("Scene2");
UnityEngine.SceneManagement.SceneManager.LoadScene("Scene2");
}
}
Ha… Ok I think I figured it out. I think you don’t need to install Unity Tools for VS, as I think there’s a special VS build which includes them, or I forgot about installing it previously… Anyway, yeah thanks my issue was purely VS imports, which work quite differently from Eclipse or even MonoDevelop from what I remember…
I’m used to just typing the class name and having the import added ‘automatically’ (ctrl+space), VS simply does not work like that, but typing the name then hitting, “Ctrl + .” will invoke “Display options on smarttag menu.Very useful for showing using/Imports options.” does basically the same and allows you to select the class & add the import automatically*.* Thanks!
i’m using a simple text editor, pluma (based on gedit) - i never installed visual studio in my computers - i guess you can use whatever text editor or ide instead of vs