Variables in C#

private is an Access Modifier keyword, int is a Data Type, _someValue is an Identifier (or name of the variable), the equal sign tells the value on the right to go into the identifier on the left. Values on the right will always be assigned to the variable on the left.

Access Modifiers

Data Types

Data type: int examples.

Identifiers

To initialize and declare a variable from the start is also a good practice.

Variable Scope

Good Practice

[Serializefield] Attribute example.

Hello everyone, My name is Gabriel Perez, I am a Unity Developer and a creator who is always learning and experimenting.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store