Any new or old Script files in Unity are unable to open. Mac OS suggests to search for the application in App Store or, from applications. Although, I couldn't find any solution or, suggestions to use any External Script Editor, or simply go back to default editor.
Unity version: (2018.4.14f1 personal)
Mac OS Catalina 10.15.1
Well, I've found a solution for now, it was updating unity to the new version, basically I added Visual Studio for mac option while downloading an update.
But, loading scripts on visual studio, Visual studio must be opened but previously I used to just open the scripts and read/write on it. Any mac users, any help simpler than this would help me a-lot.
Related
I'm having issues to get the latest installment of Unity to work along with it's recommended visual studio 2019. I have a fresh instalation of both of them, done by using the unity hub installer. I create a new project, and make a vanilla c# script and try to open it with visual studio. Visual studio opens, yet there is no project opened, no file shown, not even the project browser pops up.
I have googled a bit and the only recommended sugestion I can find is about making sure that the unity package manager has the Visual Studio package installed which it does have, to the latest version. I don't know what else to do.
I managed to figure out my answer. It seems that what I needed to do was to go into Unity -> Edit -> Preferences -> External tools and select Visual Studio 2019 as my code editor. Then make sure that the Generate csproj file was checked. It seems for some unknown reason that unity does not have this option enabled by default, even though I specified in the Unity Hub installer that I want Visual Studio to be my editor, and I would have expected that all the configurations would have been done automatically.
Unity and VS versions do not match, try changing the VS version (Unity Editor->Edit->Preferences->External Tools->External Script Editor);
Delete the ".vs" folder in the project (this folder is hidden by default, you need to open the hidden files to see it. This folder is boldly deleted, and VS will automatically create it after deletion).
Delete the "Assembly-CSharp.csproj", "Assembly-CSharp-Editor.csproj" and ".sln" files. (Boldly delete, after deleting, VS will automatically create)
I recently installed unity ,but I didn't install visual studio with it because I already have installed.
I simply opened unity and I goes to Edit > Preferences > External script editor and I selected Visual studio code . But when I opening my scripts, visual studio not giving hints for my c# code.
You probably need to install the appropriate targeting pack for Unity. That article also has some other helpful extensions to install when developing in Unity.
What you could do is just open it and close it.
What i mean by that is go to Assets > Open C# Project
Once VSCode opened, wait for 1 min, try to write something like Rigidbody.
If intellisense is working it will start giving you hints, if it's still not working
Do the process one more time,
You can refer to these pictures where how VSCode tells you whether Intellisense is working or not.
http://imgur.com/gallery/1YiuPA4
You need to install snippets for Unity in VS code.
Open VS code. Go to Extensions(ctrl+shift+X).
In search field you need to write unity
Then click to Unity Code Snippets and install it in window bellow.
Then you will be able to see Intelesence !
I recently came back to unity, as i found out that it does now support installation linux. It works, but when editing the scripts with vscode i do not get code completion.
I have installed the C# extension, the Debugger for unity extension and the Unity Code Snippets extension.
I know that there is the Visual Studio IntelliCode extension, but this does only support Java, Python js and ts. I also know that there are IDEs that i can use, like Rider, but i would like to setup this in a lightweight environment without an IDE.
So, how do i setup code completion in vscode for unity-scripts on linux?
Have you tried this guide
Install Unity Editor
Install Visual Studio Code
3.Tell Unity to use VSCode
n project preferences -> external tools you can tell Unity what program to use for editing c# scripts. If you have the Visual Studio Editor packages in your project, you should see a special “Visual Studio Code” option in your preferences. The packages are part of the standard Unity download now.
Install dotnet
Install mono-complete
Most people forget step 3
I tried everything in the installation guide, but code completion would still not work.
Somewhere I read that setting Use Global Mono to always in the C# extension for VS Code might fix the problem. So I did that, restarted Unity, Unity Hub and VS Code, and then it started working correctly.
I have just downloaded unity and saw that now it supports Visual studio code, I downloaded it and made it the default editor.
After trying to edit a script, it prompted me to download c# extension and I did, but there is no auto-complete for unity functions. How can I get that? I'm on Mac.
Any help is appreciated.
Maybe too late, but for future comers ...
There is an extension now for visual studio code called MonoBehaviour Snippets by Rachod Petchpho.
Press Ctrl+shift+x in the IDE to open extensions panel then search for MonoBehaviour Snippets, install and reload the IDE, now you will find all the autocomplete for the function names and objects just like MonoDevelop.
I had the same situation and I bang my head to the wall for days. There was no solution on the net as there are few people using Unity on linux with Visual Studio Code. I finally removed mono and went to their site and downloaded the Visual Studio build (even though we use Visual Studio Code). Then volaaa. Auto complete and suggestions related to Unity functions were there. Of course after installing the necessary extensions.
https://www.mono-project.com/download/vs/
I had the same problem with Unity + VS Code combo.
I have found an extension called Unity CodeSnippets
I highly recommend to download it. This is much better than any of other snippets collection for VSCode.
Intellisense (Autocompletion) is a pure workflow of .Net Environment. So, you need to have .Net 'Developer pack' (not Runtime) installed on your system as it installs all three necessary components below:
.Net framework
.Net Target pack
.net SDK
reference link: https://dotnet.microsoft.com/download/visual-studio-sdks
It is directly installed to a system admin-accessible path, so no need setting it up. Now, you have to tell VS Code which .Net version to use (whichever you have installed).
Your Unity project will have these two files in the root directory:
Assembly-CSharp.cs
Assembly-CSharp-Editor.cs
In these both files search for line (probably 16):
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
Edit version that you had just installed (I had 4.8). Then reopen VS Code. Now everything should work fine.
You can use the unity integration plugin:
https://code.visualstudio.com/Docs/runtimes/unity
Follow the instructions to get set up. It seems a lot of things to do but I think that's the best one.
If you still hit the issue even by using that plugin then follow this issue at their github page.
https://forum.unity.com/threads/cant-get-vscode-to-work-properly-with-unity.538224/
there are people that found a workaround.
unityoracle user said:
"This issue is that Unity Editor expects the file used to launch VSCode to have a specific name. "
and:
"Specifically, creating a symlink named "code" that opens VSCode fixed this issue"
for me, it works by downloading .NET Framework 4.7.1 Developer Pack
here
here is the link
Follow the steps from https://code.visualstudio.com/docs/other/unity
Then in unity editor, set VS Code as the default Script editor:
Edit -> Preferences -> External Tools -> External Script Editor
Right below, set Embedded packages and Local packages to true
i used these methods and it worked
Change in External Tools: Edit -> Preferences :choose " Visual Studio Code"
Open file : Assembly-CSharp-Editor in your project folder and Download the Framework Version that is the same as the version in this file EX: v4.7.1
Open VScode tool - Settings - >code lens and tick.
source from here:
https://www.gamesmobile.one/2022/01/visual-studio-code-auto-complete-with.html
I installed an older version of c# vscode extension, version 1.16.21, and it is working.
When I double click a script monodevelop isn't opening, but I can open monodevelop separately and then load projectname.sln file and it syncs ok. I can also call external editor, but I'd like to use monodevelop for code completion. Anyone managed to get this working?
I have mono-4.0.3-gtksharp-2.12.26-win32-0.msi and
gtk-sharp-2.12.26.msi installed, and I am using
Windows 7.
Maybe, Monodevelop is not associated with Unity. Go under Edit -> Preferences -> External Tools and see if Monodevelop is selected as external script editor.
I've had a problem very similar to yours and what I did to fix this was I downloaded the needed GTK# file from the Installer in Program Files>Unity> MonoDevelop> GTKSharp.( If prompted, Delete old GTK file and Re-Install GTK.) Then enter Unity and go to Edit>Preferences>External Tools>External Script Editor and Make Sure it is set to "MonoDevelop (Built-In)". Another thing that may help (I don't know if it 100% works) is to Install the .NET from MonoDevelop's Site. Also MAKE SURE UNITY IS FULLY INSTALLED! What my first problem was , it was that the Unity download would stop downloading because in task manager(CTRL+ALT+DEL>Task Manager) The "Windows Modules Installer" was running, so you have to end this task. And all of the files ( including the MonoDevelop file folder) will be there after the installation is done. Hope This Helped!