1

I am teaching myself how to create games using the Unity3d engine and Visual Studio Code, so I am new at this current set up.

I am looking for a free code editor that will work with Unity3d (with intellisense) and currently only have 2 options. Visual Studio for Mac, or Visual Studio Code.

I have tried many possible solutions for Visual Studio for Mac and I could not get intellisense to work for many Unity keywords such as transform or Time.deltaTime

So I moved on to Visual Studio Code.

VSCodes intellisense feature seems to work as far as creating classes such as Update() and Start(), but it still does not recognize Time.deltaTime or transform.Rotate().

I have Unity3d external code editor set to Visual Studio Code via Preferences -> External Tools -> External Tool Editor. AND I have VSCodes Debug tools set to Unity Editor. I have ALSO installed many extension packs in VSCode that relate to Unity and its debugging software and code snippets.

Finally, I have downloaded .NET Command Line Tools (2.2.107) which seemed to work for a very brief time period (about 20 minutes).

As far as I know, this is a software issue and not a code syntactical error at all.

And for anyone that it is not clear to, I am using macOS (Macbook Pro Mid 2012 running macOS version 10.14.4 Mojave)

Any ideas on how I could fix this issue with Visual Studio Code?

2 Answers 2

1

I have figured out the issue that I was having and the solution to it.

The Intellisense bug I was having was due to the way C# scripts in Unity were being opened. If I double clicked on a script, Visual Studio Code would open that script and the Assets Folder accordingly. BUT it would not activate Intellisense for Unity Engine.

The fix for this issue is to right click on the Assets Folder inside the Inspector in Unity and then choose Open C# Script.

-1

A link to the unity walkthrough for those of us who can't extrapolate. https://docs.unity3d.com/2017.4/Documentation/Manual/VisualStudioIntegration.html

1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review Commented Dec 31, 2022 at 6:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .