107 Replies
How are you running the code?
vscpde
vscode
That's your editor
How are you running the code?
wdym
Try running
dotnet run
Do you use
dotnet run
in the terminal? csc Program.cs
? Click a green arrow? Press Shift+Ctrl+Alt+F12?Well I use start debigging of vscode, now I used dotnet run and it worked
Ah, so just a case of VSCode being VSCode lmao
Haha
Make sure you followed $vscode steps to have everything set up
1) Install the C# extension
2)
2.a) DO NOT USE OPEN FILE
2.b) Always use
Open Folder
(from the File
menu), and open the folder containing your sln file (or the folder containing the csproj
if you have only one csproj
)
3) To make the extension start and detect C#, either:
3.a) wait for the prompt that will appear on the bottom right of your screen that ask you if you want it to create some files, and say Yes
3.b) Command Palette (F1
or Ctrl+Shift+P
) and type > .Net : Generate Assets for build and run
4) you should see a flame on the Status
bar with the Omnisharp logo (see second attached screenshot)
5) it should load to finally say OmniSharp server is running (if not ask for help)
https://media.discordapp.net/attachments/569261465463160900/1006652191689429022/unknown.png
https://cdn.discordapp.com/attachments/569261465463160900/951015732769079336/unknown.pngyes I did all those I think>]?
VSC is super finnicky and still kinda shit for writing C#, even with all the work Microsoft put in Omnisharp et al
ok quess I will soon install vs? DO I have more options?
$vsgang
š¬ š¦ š³ š¬
$ridergang
š¬ š¦ š³ š¬
Not really, VS is about the best thing you'll get for free on Windows
Yeah, just use Visual Studio or Rider
$freerider
There are two ways to get Rider for free:
Being a student: https://www.jetbrains.com/community/education/#students
Using it for an OSS project: https://www.jetbrains.com/community/opensource/#support
Rider is amazing but isn't free
VSCode for anything else
Oh how lucky I is student is rider good?
$vs
$visualstudio
Rider is amazing, 11/10 would recommend
haha
(for most things at least, sometimes it just randomly breaks)
For GUI apps, VS is better
For everything else, Rider runs circles around VS
For anything web, Rider dances on VS's grave
sounds like unity lol
Unity is uhhh... yeah it's a thing
Unity is fine
if you like suffering
Unity uses outdated fork of Mono and non-standard practices
Like enumerators instead of async and stuff
VS works fine with it though
Latest version of Unity works with async
They're getting there
This is true though. I hope they improve on that
outdated? does that mean I will get shocked using normal c#?
Yeah
kinda yes
No lol
Unity is full of, uh, let's just say "peculiarities"
Have you guys even used Unity in the past few months
i used it about a year ago, and considering unity as a company, i wouldn't expect them to have changed the entire scripting api since then
Admittedly, can't say I had much interest in Unity
Might check it out in 2047 when they migrate to .NET 5
Unity supports .Net Standard 2.1
Ah, so it's merely very outdated, not tremendously outdated
Good to know
It's literally the latest
It's just that Mono sucks
ok so for today:
delete all the mess I made
ask admin to install me vs and dotnet 6.0
all good!
.NET Standard 2.1 is not the latest
Currently .NET 7 is the latest
.NET Standard is about supporting the lowest common denominator of supported versions. 2.1 supports versions from Core 3.0 up, so it's basically equal to 3.0
3.0, 3.1, 5.0, 6.0, 7.0
Merely 5 versions behind
.NET Standard 2.1 is .NET 5, 6 and 7
anyway, this is not related to the question
You guys are acting like every new .NET version has something that is a must-have for Unity
let's move the discussion to #chat
This is not even how .NET versioning works anyway
yes it is lol
.NET 7 implements .NET Standard 2.1
because .NET versioning is weird
Docs beg to differ
anyway, let's go to #chat
You're right, I read wrong
But comparing .NET versions to .NET Standard doesn't make sense so I don't understand why you're doing that
Mono can update by itself and it doesn't rely on specs that .NET brings. It just implements what .NET Standard defines
Because .NET Standard describes the lowest common denominator of versions that implement it
let's go to #chat
true but anyway I came to a conclusion bout the problem this channel can be completely yours
You're still acting like "lowest common denominator" means that Unity is very behind on versioning š
Unity is behind on versioning, but not by that much
.NET 6 has System.Text.Json. .NET Standard 2.1 supports 3.0 and up. 3.0 doesn't have System.Text.Json. Therefore, .NET Standard 2.1 doesn't have System.Text.Json
Same goes for other features and other APIs
.NET Standard is only as new as the oldest version that implements it
Unity has a Newtonsoft as a package
Iā
It's not about STJ... it's about any and all sorts of features in versions newer than 3.0
System.Text.Json has support for .NET Standard 2.0
And you can literally just import the dll manually if you want to use it. You're not at all depending on support by any .NET version
That's why .NET Standard is a thing
Afaik the version Unity uses doesn't support
Span<T>
, which is heavily relied upon by STJ...?No Idea
But I am 100% sure it exists in .NET Standard 2.1 anyway
so If that is the case you can just upgrade to that
Again, I'm not talking about STJ... I'm talking about Unity only supporting the features of .NET Core 3.0 precisely because it implements .NET Standard 2.1
You can still import the dll manually for most of these
Alternatively Unity has alternatives for a lot, so this might also be the case for those
Aight, okay, I'm out. We're clearly talking besides each other, not even about the same point
Not really. You think Unity is behind on versioning because Mono is behind, and I am giving you a clear example as to why that is really not the case and why it is perfectly fine to use Unity š
It is behind though
Unless it starts supporting .NET 7 tomorrow, it's behind
Open Unity and try writing this
No file-scoped namespaces, no static abstract interface members
No
init
No required properties
No recordsThe whole point is that it would be so behind that OP would "get shocked using normal c#?" and this is not true at all
Good job, half of those are .NET 7 features, and the rest is .NET 6
(file-scoped namespaces is a language feature which doesn't require runtime support, it only requires a language version higher than what Unity allows)
So?
And you can miss most of those
Those are up to date
Unity not supporting them means... it's outdated
FusedQyou#2784
Not really. You think Unity is behind on versioning because Mono is behind, and I am giving you a clear example as to why that is really not the case and why it is perfectly fine to use Unity š
Quoted by
<@!85903769203642368> from #Problem with .net (click here)
React with ā to remove this embed.
Yes, Unity is behind
Yes, Mono is behind
Yes, it is the case
QED
Even if Unity doesn't use the latest version, the core concepts of game development inherently lead to very different practices than what other fields of programming do. Unity also uses different conventions (ex. camelCase instead of PascalCase for properties), which are more-so due to having to support tons of legacy than actually being "bad".
Unity not using best practices does not mean it is behind
Try getting a Unity developer to make a web API with ASP.NET Core or vice-versa, it's two almost completely different paradigms.
Well it still is slightly behind in terms of versioning, as previous said.
that's just an objective fact
The practices thing is more subjective though. Some people only ever use Unity, so they don't mind.
Yes, it is behind on versioning because they still use Mono, and Mono sucks. But what I don't understand is why it is such as bad thing that they don't have support for .NET 7 features, like mentioned above
Things like
Span<T>
would be very useful in game dev in performance-critical situations. It's not available in Unity due to the version it uses.And the .NET 6 features mentioned above are literally QOL features
Yeah but span exists in .NET standard 2.1 so Unity has that too then
Static abstract members can be very useful when describing certain kinds of data relationships.
Isn't that .NET 7 though?
yes
If this is the case then apologies, didn't know
I believe they are skipping .NET 6 and going for .NET 7 though
I think they're going for .NET 5 first...?
They seem pretty active with upgrading to better practices in general
Not sure, but they are skipping a version
Right now they are adding full support for async-await
REALLY?
wow
It's not the same though
They adjusted the state machine to work on the main thread or something, but this has existed for a while
Hope the async-await support goes better than their DOTs escapades
They are adding many type of awaitable methods that can delay for a given amount of time, or for a single frame, and stuff like that
I also read about changing threads or something but I can't find the documentation anymore
It already exists but I literally can't find it
neat
Like I said, it does work differently by returning an
Awaitable
sadly
So I guess you can't really call it full async-await supportThis is what I mean with changing threads: https://docs.unity3d.com/2023.1/Documentation/ScriptReference/Awaitable.BackgroundThreadAsync.html
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.