How to show script fields in the Inspector in Unity?

Just like any Unity built-in Components, you can allow values in your script to be edited from the Inspector.

Here are some examples:

public class InspectorFields : MonoBehaviour
{
public int intField=5;
public float floatField=0.5f;
public string stringField="Unity";
public bool boolField= true;
public Color colorField;
public Vector3 vector3Field;
public Gradient GradientField;
public Rect rectField;
public Quaternion QuaternionField;
public AnimationCurve…