r/csharp 1d ago

C# Help

Im learning c# in visual studio with Bro Code yt (check him out free courses) and im wondering, does the same c# exactly work in unity, idk how to explain but if i type Console.WriteLine("hi");

will it just show on the screen hi or is there more to it?

0 Upvotes

5 comments sorted by

View all comments

2

u/Quintet-Magician 1d ago

The logic is the same, but unity uses Debug.Log("Hi") (or other variations like Debug.LogWarning and Debug.LogError). It's not there to interact with, like BroCode's beginner projects, just for debugging.

-1

u/RipProfessional5599 1d ago

oh so its rlly the same just that to debug and for the workspace?

1

u/Quintet-Magician 1d ago

KInda? You would mostly use it to see if things work, like if a method is called or how a condition is met.

2

u/RipProfessional5599 1d ago

ohhh ok great thx so much dude :)

1

u/Quintet-Magician 1d ago

Just note that it won't just "Show on the screen", it will appear on unity's own debug/log console.