Is there a way to force a static function to gain access to a non-static variable stored in the same class? I could have sworn I saw a compiler metadata for it somewhere before but I can’t find anything now
There’s no metadata for that, it’s not something that’s possible.
How would you know from which object, if any, to retrieve the data from?
Can you share a snippet of code of what you are trying to achieve?
Essentially something like this:
That is simply not possible, you need an object instance to access non static fields.