much like you do, i write a lot of scripts that have a static instance with the instance set to this. So my question is how do you call a function from an event using the instance accessor?
Currently you can only call static functions, but not from a static instance field/property.
E.g.: YourClass.YourFunction() is possible, but YourClass.Instance.YourFunction() isn't.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
E.g.: YourClass.YourFunction() is possible, but YourClass.Instance.YourFunction() isn't.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
would a function that accesses its instance work?
so:
public float TimeElapsed()
{
return instance.timeElapsed;
}