How do i expose a child class public variable that is inside a parent class?

My first-person view character is standing on a platform which is moving in a straight line through a tunnel. The tunnel is a blueprint actor class and inside this blueprint are instances of another class. This child class moves a cube from the ceiling to the floor of the tunnel using a timeline node. The idea is to slowly rotate the parent tunnel blueprint as the platform moves through it, with all the child class instances rotating in unison as the cubes move from ceiling to floor.

These child class instances have a public variable which should let me set a delay before triggering the timeline animation. My problem is that because they are child actors of the parent tunnel class I cant see a way to set the value of the variable. It would be great if when selecting each instance of the child class from the component list of the parent class, I would see a details panel of the child class instance with it’s public variable visible.

I hope this makes sense, I’m a UE4 noob so I might be going about this completely the wrong way.

The answer is you can’t. Apparently no one ever (apart from me and you) needs to do this. We are literally the only people in existence who need this feature. So until the (non existent) day comes where this feature is added, my only advise is to split your component into two components: Child actor that handles all logic, and an actor component (who’s variables are actually exposed when you add them to a blueprint) which contains the data. This is obviously not ideal and becomes messy very quick and is just generally more work than is actually needed. But it’s all I can do right now. Double up everything because child actors don’t need to have exposed variables, that’s just stupid. Apart from the part where it makes intuitive sense for exposed variables to be a thing on child actors…

Have an UNREAL day and enjoy your non-exposed variables!

1 Like