𝐕𝐢𝐠𝐢𝐥
𝐕𝐢𝐠𝐢𝐥
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/5/2023 in #help
❔ Dictionary and memory hijinks
Thanks!
6 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/5/2023 in #help
❔ Dictionary and memory hijinks
I come from a C++ background, so I tend to not be entirely sure on how the GC/Memory Management of C# will handle these types of situation (cause over there I can just use a std::vector of pointers)
6 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/5/2023 in #help
❔ Dictionary and memory hijinks
No description
6 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
❔ std::function-like var
Maybe Action could be a good way to solve it?
5 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
huge dumb dumb moment on my part, thanks
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
Yeah, I realized now
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
I'm STUPID LMAO
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
OHHH
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
So the objects should already be made, instantiated with new, attached to a variable, and only once they've been added they're actually listed
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
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
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
No description
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
No description
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
No description
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 10/4/2023 in #help
✅ "Object reference not set to an instance of"
ConVar.cs
14 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 9/29/2023 in #help
❔ Function with generic argument as a setter
I'm gonna move sceneInfo to have a proper default constructor instead of doing this terrible-ness very soon, I initially started off with the premise of "sceneInfo" should always be manually initialized because the player may load from a save, but I feel like this is a redundant thing to do in the context of C#, where I'm C++ brained (recently making a switch to expand into other languages and specialities) and I'm still very very used to doing stuff like this when it's over complicating code
27 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 9/29/2023 in #help
❔ Function with generic argument as a setter
I'd love to use a super complicated template function like I wanted originally... but you can't pass properties as ref (boo womp)
27 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 9/29/2023 in #help
❔ Function with generic argument as a setter
I just made a public function that retrieves the (now private) sceneInfo's ref and if it isn't initialized, throws an error, if it is, all ensues as normal.
27 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 9/29/2023 in #help
❔ Function with generic argument as a setter
the good ol
27 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 9/29/2023 in #help
❔ Function with generic argument as a setter
what about the code path if structInit hasn't been initialized?
27 replies
CC#
Created by 𝐕𝐢𝐠𝐢𝐥 on 9/29/2023 in #help
❔ Function with generic argument as a setter
ooh that could work
27 replies