edited June 2021 in ORK Support
I'm not sure when the update was made.
For example, when a function with a default value argument such as the one below is called with a Call function node without the pos argument, a warning of not found appears and the function is not called.

public void SpawnPoolPrefab(string prefab, float destroyTime, Vector3 pos = default(Vector3))

Another example is
public void PlayerEnemyIgnoreLayerOn(int isEnemyLookUp = 0)

All the released games are now full of bugs.
There are many cases where you want to omit arguments, so there are many Functions like this one.
Please fix this, because in normal C# you can call it with no arguments.
Post edited by joeee19 on
  • edited June 2021
    Yeah, that's because there is no function without that parameter in the compiled code. The default value parameters are (AFAIK) only used by the compiler - calling the function via reflection (which is used by the function nodes) requires to set up all parameters, even those with default values.

    I haven't done any changes to this - ORK's code just uses regular C# reflection functionality.
    Post edited by gamingislove on
    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!
Sign In or Register to comment.