SerializeField attribute in Unity 5.5

from: Unity 5.x By Example by Alan Thorn

In Unity, class variables declared as public  are displayed as editable fields in the Object Inspector of the editor. The private  variables, in contrast, are hidden from the Inspector by default. However, you can force them to be visible, if needed, using the SerializeField  attribute. The private  variables prefixed with this attribute will be displayed in the Object Inspector just like a public  variables, even though the variable’s scope still remains private .

from: https://www.tutorialspoint.com/csharp/csharp_attributes.htm

An attribute is a declarative tag that is used to convey information to runtime about the behaviors of various elements like classes, methods, structures, enumerators, assemblies etc. in your program. You can add declarative information to a program by using an attribute. A declarative tag is depicted by square ([ ]) brackets placed above the element it is used for.

Attributes are used for adding metadata, such as compiler instruction and other information such as comments, description, methods and classes to a program. The .Net Framework provides two types of attributes: the pre-defined attributes and custom built attributes.