✅ "Object reference not set to an instance of"
Title, I use a Interface to allow me to make a list of objects that require generic arguments, one problem is that while I don't think anything is out of the ordinary, and I do instantiate new variables + objects attached to said variables (I do use Godot but it's more of a C# help, as these are bare bare objects), and once I try to cycle the list, bam all hell breaks loose, dropping attachments now
10 Replies
ConVar.cs
Console.cs
the call
From my POV:
I create the console, which upon initialization creates two new variables of the ConVar<T> type which implements IConVar (no issue?), and first add them to the list, THEN, try to list them with a foreach
So the objects should already be made, instantiated with
new
, attached to a variable, and only once they've been added they're actually listedThe list is not instantiated
OHHH
I'm STUPID LMAO
You have a field of type
List<T>
but no actual List<T>
Yeah, I realized now
huge dumb dumb moment on my part, thanks