C# List<> confusion

Hello Everyone,

I am having trouble with Lists. When I call List.Add(object), in the inspector, it creates an empty list node. If i did that ten times it would create ten empty list nodes. Here is basic idea of my code.

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class SkillList : MonoBehaviour
{

public List skillList;
public Skill temp;

void Start ()
{
skillList = new List();
temp = new Skill();

skillList.Add(temp);

}

}

Skill is just a container class that I want to hold variables to be called upon later.

From what you have said, and described, this is exactly how your code works.

If you call the List.Add it will add a new item to the list, it does not check to see if it’s unique. You need to create some form of searching function to identify the items you want modified in the list if indeed you are wanting them modified.