Making a variable obligatory when creating the actor


if an actor has a variable A as an object instance reference which is exposed as a pin on spawn, how to make setting this variable obligatory when spawning the actor? So that the editor throws an error message if the pin is not set.

Thank you,


You can expose the variables on spawn, then when you use the spawn function with that actor you will see the variables, how to make it obligatory modify the source code.

If this is required only for a specific class, then you can have the Spawn Actor from Class node inside a new function and then have input parameters for it match the exposed variables in the spawn node. You can then add an IsValid check for the input parameter (since its an object) before calling the spawn node within the function. If the object isn’t valid, you print out an error message.