I faced a problem today which has happened to me several times before. I have a generic list of my object:
List<Classes.Object.GameObject> ObjectList = new List<Classes.Object.GameObject>();
I decided to get an instance of Classes.Object.GameObject
from the list by:
Classes.Object.GameObject TempObject = new Classes.Object.GameObject;
TempObject = ObjectList[10];
It's working good till here but when I do some changes on TempObject the object of index in list which I mentioned changes too! I mean the ObjectList[10] will change by changing of TempObject. There is no referencing at all. Maybe I didn't understand OO programming well.
Dear moderators you made a mistake in editing my grammar! (you changed till to until)