Jason Schneider
Jun 17, 2021

--

Coding in C# — What is a variable?

A variable can be thought of as a box that has information in it. Think of a game that you play, it may have your name, your avatars name, ammo count and so forth. These are all variables.

There are three (3) data types of variables, with an optional Fourth. They are:

There are also two (2) types of reference for a variable. These are:

public- anyone and any other script can access this variable. It will also be seen in the Unity editor.

private- only the script the variable is in can access it.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response