edited February 2017 in ORK Support
Howdy,

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?
Post edited by chud575 on
  • 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!
  • edited February 2017
    the plot thickens...

    would a function that accesses its instance work?

    so:
    public float TimeElapsed()
    {
    return instance.timeElapsed;
    }
    Post edited by chud575 on
  • yup, that worked
Sign In or Register to comment.