Accessed none trying to read property?
Ok so I am currently working on a BP that allows one key to spawn and show actor while two other keys hide actor.
The blueprint is actually working but I keep getting this error:
Error Blueprint Runtime Error: Accessed None trying to read property Companion2 from function: 'ExecuteUbergraph_BP_Player' from node: Set Actor Hidden In Game in graph: EventGraph in object: BP_Player with description: Accessed None trying to read property Companion2
Not really sure how to go about fixing this or if it is anything to worry about? Any help would be greatly appreciated.
asked Aug 20 '17 at 05:46 PM in Blueprint Scripting
Its pretty self explaining. If you hit the Hide Key before you spawned anything your Code does not know what you want it to Hide becuase you tell him to hide None/Nothing/Null.
Make sure when you drag anything from a Blue Wire (Objects) those things exist (use a IsValid Node) before you try to do something with them. In a Shipped Game this would be a Hard Crash. In Engine it prevents the Crash and throws a error at you.
Edit: I also noticed you have the same Input event twice. Bad Practise solve it with one Input Event only since you cant guarantee the order of execution.
Follow this question
Once you sign in you will be able to subscribe for any updates here