[=drekmonger;230707]
I might be missing something…is there no way to override an actor component’s constructor with blueprints? (What does the Auto Activate flag do, anyway? I had hoped that it setting it to true would cause the Initialize Component event to act like a constructor – but it doesn’t seem to be the case.)
For lack of finding an overriddable constructor, I tried using the Get Components node on my actor’s constructor, then calling a function on the component – which sort of works. A few problems there, though.
First, if a component is part of the actor, rather than just attached to the actor out in the level, there’s no way to modify the component’s variables from the level editor. It’s terribly inconvenient. It would be really nice to be able to change those variables on a per instance basis from the level editor. I’m not sure why it works the way it does.
Second, if the component is attached to the actor in the level, it’s exposed variables are modifiable, but the editor doesn’t dirty the actor and thus fire it’s constructor when these variables are messed with. I made an exposed boolean on my actor that I can toggle on and off in order to force the constructor to execute (more easily), but again, it’s inconvenient. It’s a couple extra clicks for something that updates wonderfully and automagically when the code is in the actor’s constructor. It’s swank to move a slider and see things happen immediately in the viewport.
Third, it’s pretty fragile. For example, I ‘accidentally’ deleted an event on a component that was called by the actor’s constructor, and the editor crashed hard. I’ve had some other minor bugs that I believe are caused by the way the components handle circular references, where a level containing an actor attached to a component refuses to save because the component is a ‘private object’.
[/]
Not really related to your problem, but i had the same problem you have in your third statement. Just placed a mesh to my scene, added a blueprint component on scene, choosed where to save blueprint component, and at the end i created a blueprint class from the object i have in scene. But now, trying to saving scene gives me error that blueprint component is an external object and couldn’t be saved. Making my components from blueprint editor doesn’t give me the same error. Very frustrating.