Reply To: FlowInput.isConnected is always false when play on device

Forums 💬 FlowCanvas ⚙️ Support FlowInput.isConnected is always false when play on device Reply To: FlowInput.isConnected is always false when play on device

#21687
Gavalakis
Keymaster

    Hey,

    It’s just that the way isConnected is determined in the editor, is after calling the FlowNode.GatherPorts -> ValidateConnections.
    ValidateConnections is currently wrapped in a #if UNITY_EDITOR, because the way validations are made a performance costly (lots of foreach iterations and type conversion checks), which are otherwise not really required in runtime. Unfortunately or not, isConnected is set from within this Validation method.

    So, if we were to simply remove #if UNITY_EDITOR and run ValidateConnections method, while isConnected will work correctly, there will be a performance cost.

    Thus, the solution would be to find another way to determine isConnected and move it outside of the Validate methods, which requires some refactoring to make sure everything works as intended.

    🙂