Get and Set nodes for variables from a BP's parent class will not compile without a reference to Self. Without one, the BP fails to compile with the following error:
"Error Variable node Get NewVar uses an invalid target. It may depend on a node that is not connected to the execution chain, and got purged."
Workarounds:
Attaching a reference to Self fixes the compiler error.
This is not necessary if you copy a Get or Set node for the variable in the parent and paste it into the Child.
1. Open any project
2. Create a new Actor Blueprint, "ParentBP"
3. Create a new variable of any type, "NewVar"
4. Create a new Actor Blueprint of type ParentBP, "ChildBP"
5. Get NewVar
6. Event Begin Play > Print String
7. NewVar > To String > attach to Print String
8. Compile
Result:
Compiler error: "Error Variable node Get NewVar uses an invalid target. It may depend on a node that is not connected to the execution chain, and got purged."
Adding a reference to Self fixes the compiler error.
Head over to the existing Questions & Answers thread and let us know what's up.
2 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.7, 4.8 |
Target Fix | 4.8 |
Fix Commit | 2502165 |
---|
Created | Jan 20, 2015 |
---|---|
Resolved | Apr 4, 2015 |
Updated | Apr 27, 2018 |