object reference not set to an instance of an object unity code example
Example 1: object reference not set to an instance of an object in c#
You need to initialize the list first:
protected List<string> list = new List<string>();
Example 2: unity object not set to an instance of an object
One of your objects doesn't have a value. Make sure all your variable has values.