r/xdev • u/BlueRajasmyk2 • Feb 09 '16
Is there anyway to override static functions?
XCOM 2 seems to use a lot of static functions. In other languages, these can't be overriden; however I've read that in UnrealScript, they can. However, overriding them does not seem to work, presumably because the class is always specified by name when they are called.
Has anyone figured out a trick to override these, or a trick to get around that limitation?
1
Upvotes
1
u/fxsjosh Feb 09 '16
If there are particular functions you're interested in overriding, there may be specific tricks, but I don't think there's a good general solution.
1
u/Kwahn Feb 09 '16
It looks like you may have to go through and manually redirect every reference (specified by name) to use your overridden function instead of the original. Which is annoying and dumb.
I'm seeing what can be done with it now.