How to tell editor if it can't find a file then do nothing?

I’ve created a BP that references some other tools I’ve developed for virtual production. However these other tools won’t always be in the same project as they will be deployed on a per project basis. So obviously when I try open the blueprint and the when the other tools aren’t in the same project, it crashes the engine as it cant find the file.

I thought the BP in the image would work but I’m still getting crashes. What am I doing wrong?

To my knowledge that will not work like you expect. When blueprints are compiled every node is evaluated as the compiler does not know which path you might take during runtime.

There are of course various ways to handle such a dependency but would require more knowledge on your overall project setup to offer a proper solution. One simple approach you might be able to take is to pass in an actor class variable. Then, instead of checking to see if the asset exists, simply check to see if the actor class variable is valid (set to something). In the projects which you have the asset, you can of course set the variable to the class name you need. In the others you leave it empty and the follow-on code won’t execute. Make sense?

1 Like