I got stuck on the first scripts

I am new to this and I don’t understand what these messages mean.

Hi,

Please check the API Compatibility Level in the Unity Settings. Is it set to .NET 4.x?

@Nina i just had the exact same problem, i made a topic about it, could you give us a little more info please? i feel like i don’t understand enough how all this works and i don’t want to make things worst
i don’t even know what is API compatibility level
My computer is brand new so there is nothing installed on it except unity and visual studio code, i now installed the .net core sdk by clicking the link provided in the notification that you can see in Travscarver’s picture

Hi @Csharpalos,

I already replied in your other thread. Maybe we should close your other thread and discuss the issue here instead?

Unity works with C# (.NET 4.x, to be precise), and the actual implementation of C#, meaning the things we can use, are included in the Mono or .NET Framework.

If you use Windows, install the latest .NET Framework, which is currently 4.8. If you use MacOS or Linux, install the MONO Framework.

In Unity, set the API Compatibility Level to .NET 4.x.

Did this fix the issue for you?

yes, i will close the other thread, should i have installed .NET 5.0 SDK (v5.0.103) (which is where the link sent me to when i clicked get the .NET Core SDK button) before doing this?
and do i download and install .NET Framework 4.8 Runtime or .NET Framework 4.8 Developer Pack? or both?

The .NET 4.8 developer pack because you want to write code.

also, you can close the other thread and answer here to make it simple. and i have no idea where i should find the API compatibility level in Unity, all this is new to me

Can you open Unity? Does it run? If so, got to Edit > Project Settings > Player. There is a drop down menu labelled “API Compatibility Level”. Click on the drop down menu and select .NET 4.x if it hasn’t been selected yet.

I moved our discussion from your other thread to this one, so we have all relevant information in one place. See below as of #9.

Hi, i just RE-started the 3D course since it has been updated and im trying to set up VS code. Once i installed the c# extension, it said that there was no .net core SDK installed and provided me a link to download it, which i did and installed it. Now it gives me an error saying that Omnisharp.MSBuild.ProjectLoader has a problem (reference assemblies for .NETFramework, Version=v4.7.1 were not found and that Omnisharp.MSBuild.ProjectManager failed to load project file (the script is open in VS code). I have absolutely no idea what to do now. Can anyone help me please? Thank you!

Hi,

First of all, where do you get these error messages? If it’s in Unity, set the API Compatibility Level to .NET 4.x.

See here:

Secondly, which operating system do you use? Is the latest .NET 4 Framework installed?

i get these messages in visual studio code

i am on windows 10, my computer is brand new and i only have unity and vs code installed

I think the error message in the Unity console refers to this line:

image

Remove the last comma because the Translate method takes in 3 arguments. If you have three commas, you would pass on 4 arguments, one of which is empty.

Once the issue is fixed, click on the X to close the box which complains about the .NET SDK Core. Maybe it is not referring to Unity. Restart Unity and VS Code. Then test your game in Unity. If no error messages pop up in the console, the problem is fixed.

In regards to the second message box, check if you installed all extensions required for Unity. See here:

this is not my picture, i used the other guy picture since i don’t have the .NET core SDK message anymore because i already installed it. i haven’t write any line of code so far anywhere.

Could you share a screenshot of what you see on your screen? The entire screen would be helpful, excluding personal information, of course.

I’m off now for a couple of hours as it’s already 1:22 a.m. here.

Please feel free to ask our helpful community of students over on our Discord chat server.

Otherwise, I’m going to continue supporting you in a couple of ours given you haven’t solved the problem until then. In that case, a screenshot of the problem would be great because I’m still not sure what exactly you would like to fix. Maybe the message you are getting is not referring to something that would prevent you from developing your game.

And in case you haven’t tried this yet: Reboot your computer. That often magically fixes problems.

2 Likes

it seems like it is not fixed, i mean, yes i can write code, but i followed the exact instructions from the video and i start with a notification like this as soon as i install c# extension in visual stufio code, i feel like i would prefer to start to do things the right way and not just go with it and see later if it is going to cause any trouble…
this is the notification i get


1 Like

it looks like this as soon as i install c# extension (that’s the moment the notifications pop up).

@Nina Hi again, did you have time to check the screenshots? i am at the last screenshot i sent yesterday. i have unity installed, visual studio code installed, i installed c# extension and i now have the 2 notifications at the bottom saying the .NET core SDK cannot be located and the second notification has to do with c# extension too, something about omnisharp. what do i do next? Do i follow the link (“Get the .NET core SDK” blue button) on the notification and install it?
if yes, then what do i do with the omnisharp problem?
Thank you

Hi,

Is your first screenshot from yesterday still valid? If so, please take a look at your console and follow this instruction:

To see if the correct version of the .NET Framework is installed, please follow this instruction (“How to check .NET version using File Explorer”):

If the issue persists, please follow the instructions in this thread:

According to the answer with the most upvotes, one is getting problems if VS Code is running while installing the .NET Core SDK.

If you did that and if there are still messages, click on “Show Output”. Maybe a more helpful message will show up in the OUTPUT (console) of VS Code.

And if nothing helps, I’d suggest to uninstall both VS Code and the .NET Core SDK. Reboot your computer. Reinstall both while VS Code is not running.

Privacy & Terms