store prefab Component in list without instantiate
i have a prefab that i want to change its component and store it in list before instantiate, here is my script:
GameObject _myPrefab;
List mylist = newList;
_myPrefab.GetComponent().value = 1;
mylist.Add(_myPrefab);
I found that when i try to instantiate the object in list, it will lose all the component i set early. how can i prevent that?
Comment