Skip to content

My learning journey of the C# programming language and the Unity game development framework.

Notifications You must be signed in to change notification settings

WindJammer6/16.-Csharp-and-Unity-Learning

Repository files navigation

16.-Csharp-and-Unity-Learning My SkillsMy Skills

After working with Python for quite a while, I wanted to adopt a second programming language to further hone my programming skills. In addition to this, a friend of mine (Github account: WolfPark) always wanted to create a video game of his own, and recommended me one of the many powerful game development engines/framework, Unity. However, the main issue is that Unity uses the C# language, rather than Python. Hence, I decided to take this opportunity to while helping out on making a video game on Unity, to also learn the C# programming language, as well as some of the Unity C# syntax.

Apparently the C# programming language is also an object-oriented programming language, like Python.

Apart from the 'Unity C# Syntax learn code archives' folder's sources where I learnt Unity C# syntax, I also made reference from this popular 'The Unity Tutorial For Complete Beginners' Youtube tutorial video (link: https://www.youtube.com/watch?v=XtQMytORBmM&t=1s (Game Maker's Toolkit)) to get a general grasp on how the Unity editor/software looks like and work, which helped tremondously in my understanding of the Unity editor/software.

An example of what this 'The Unity Tutorial For Complete Beginners' Unity Youtube tutorial video by Game Maker's Toolkit taught, on the terminology of the 4 most important panels of the Unity editor/software:


Table of Contents:

Here is a directory to the explanations of what each folder contains in this C# and Unity learning journey repository:

  1. C# environment in VS code (to run C# code)
  2. C# learn code archives
  3. Unity C# Syntax learn Unity project
  4. Unity C# Syntax learn code archives

This is the C# environment that you need to set up in VS code in order to run your C# files in VS code. In this C# environment in VS code folder, you can modify the 'run_code_here.cs' C# file to whatever C# code you want to run in VS code. Don't modify anything else in this C# environment in VS code folder as it might introduce bugs to your C# environment in VS code.

This is Youtube video where I learnt how to set up this C# environment in VS code, and how to use it to run C# code in VS code: https://www.youtube.com/watch?v=CO4BGZOuUkM (Tech Decode Tutorials)

I'm not sure if this C# environment works for other IDE/compilers... I have only ever used it for VS code and it works for VS code.

Source(s):

  • https://www.youtube.com/watch?v=CO4BGZOuUkM (Tech Decode Tutorials) (Youtube video labelled 'How to Run C# in Visual Studio Code on Windows 10 2022' by Tech Decode Tutorials) for the setting up c# in vscode section stuffs

This folder contains all the C# files during my C# programming language learning journey, segregated into 4 folders, 'C# basics', 'C# built-in data structures', 'C# OOP' and 'C# short projects', organised based on the programming concept of each C# file. Most of the information in the C# files in this folder is taken from this 3 hour long Youtube video: https://www.youtube.com/watch?v=GhQdlIFylQ8&t=12271s (freeCodeCamp), while I split its lessons myself to the individual folders.

For the information in the C# files in the C# basics folder, '920. What_are_namespaces_in_C#_and_namespace_statements_and_using_statements_and_their_applications_in_the_C#_programmiing_language.txt', '921. namespace_statements.cs', and '922. using_statements.cs', regarding about Namespaces in the C# programming language, 'namespace' and 'using' statements as well as their applications in the structure of the C# programming language, their sources are taken separately from https://www.youtube.com/watch?v=1BYEC1ZENSg&t=1s (Matt Noone) (this Youtube short provides a very concise and clear summary of what are Namespaces in the C# programming language, 'namespace' and 'using' statements as well as their applications in the structure of the C# programming language) and https://stackoverflow.com/questions/11427223/what-is-the-difference-between-a-class-library-and-a-namespace (Stack Overflow). I had to source the information from other sources due to the higher complexity of these concepts, that they aren't explained in the 3 hour long Youtube video by freeCodeCamp, and that they aren't present in Python programming language as well.

How to use the C# files in this folder?
The C# files in this folder need to be used along with the 'C# environment in VS code (to run C# code)' folder in order to run them in VS code.


C# basics
This folder contains all the C# files that deals with the basic syntax and structure in the C# programming language.

C# built-in data structures
This folder contains all the C# files that deals with the built-in data structures in the C# programming language.

C# OOP
This folder contains all the C# files that deals with Object-Oriented Programming (OOP) concept in the C# programming language.

C# short projects
This folder contains all the C# files that deals with some guided mini-projects, from the same freeCodeCamp Youtube video, including, creating a calculator, a mad-lib game, and a guessing game, in the C# programming language.

'Setting_up_C#_in VScode.txt' text file
This file contains information from the Youtube video on how to set up a C# environment in VS code, and how to use it to run C# code in VS code. (link: https://www.youtube.com/watch?v=CO4BGZOuUkM (Tech Decode Tutorials))

This file is in this folder, rather than the previous folder, 'C# environment in VS code (to run C# code)' because it might introduce bugs to the 'C# environment in VS code (to run C# code)' folder if this file is added to it.


Source(s):


This is the Unity C# syntax learn project folder, which you can treat as the 'environment' to run the Unity C# scripts on the Unity editor/software, since these Unity C# scripts cannot be run on other IDEs, such as VS code, only in the Unity editor/software's terminal as a Unity project.

I did not refer to any sources in order to create this folder since the Unity editor/software automatically generates a Unity project folder like this one whenever you create a Unity game, which stores all the information of your Unity game, and allows you to run/edit your Unity game and the C# scripts inside it in the Unity editor/software when you import this Unity project folder into the Unity editor/software.

Refer to my seperate repository, 19.-2D-Unity-Game to see what does each seperate folder within this 'Unity C# syntax learn project folder' does. And also, how to download this 'Unity C# syntax learn project folder' 'Unity project' (or any other Unity projects) from Github, as well as using it in the Unity editor/software's terminal, in the section 'How to download and use this Unity source code on Github in your Unity editor/software?' in 'Technicalities between Unity and Github' of the repository's 'README.md' file.

Source(s):
nil


This folder contains all the C# files during my Unity C# syntax learning journey, organised roughly according to the order of the Unity's Youtube playlist's videos on Unity C# syntax. (link: https://www.youtube.com/playlist?list=PLX2vGYjWbI0S9-X2Q021GUtolTqbUBB9B (Unity)) Most of the information in this folder is taken from this Unity Youtube playlist: https://www.youtube.com/playlist?list=PLX2vGYjWbI0S9-X2Q021GUtolTqbUBB9B (Unity), with a lot of assistance from ChatGPT and Googling due to how poor Unity's Youtube videos tutorials on Unity C# syntax are at teaching haiz... I did skip some of the videos from the Unity Youtube playlist as well, did not follow all of them exactly.

How to use the C# files in this folder?
The C# files in this folder needs to be used along with the 'Unity C# Syntax learn Unity project' folder in order to run them in the Unity editor/software's terminal, since these Unity C# scripts cannot be run on other IDEs, such as VS code. (which these C# files already are added to the Unity C# Syntax learn Unity project)

Source(s):

About

My learning journey of the C# programming language and the Unity game development framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages