Optional components in BP?
Is there a straightforward way to allow a BP scripter to decide whether a component from a parent C++ class should be created or not? In a recent version a selection menu was added to C++ component variables from where you can select either a component of the class or None. I don't really know what the point of this is, since no matter what you set it to it will be reset to the original component value once you restart the editor. Another idea was to create a component of the desired class in Blueprint but, since I need to know whether the component exists on class default objects and blueprint components do not seem to be valid on CDOs this is not an option either.
The only working solution I can think if right now is to have a boolean variable for each component indicating whether it should be deleted right after component initialization, however it would be nice if there was a cleaner solution.
asked Oct 19 '15 at 01:10 PM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here