How to fix error Accessed None trying to read property K2Node_DynamicCast_AsThird_Person_Character .

If none of you condition end up at a return node, the function should still work and the bool parameter should return false. So you do not HAVE to add an extra return, it’s just a suggestion for clarity sake.

The problem with the original image is that hes trying to get a value that seems to be later in the execution order.

In your prev example if the cast fails you should get the print and false on the bool, so should not crash from a null value since each return node and nodes associated with it are behind a check (the cast).

Hope it makes sense.

1 Like