Expose variable to BP in an inherited component?

Two questions:

First I was trying to expose a new variable in the TankAimingComponent.h file.

I set it up like this:

UPROPERTY(EditDefaultsOnly, Category = Firing)
	bool UseHighArc = false;

I compiled but the aiming component still shows none of its properties in the blueprint window. Is there a way to fix this or is there a better solution. I thought about adding the variable in the tank.h and the referencing that, but I couldn’t figure out how to get that working either.

My second question is; when placing and moving objects in unreal is there a way to get that object to snap to the surface under the cursor. I know about END, but that’s only good for the ground and you have to have aligned the object already in the horizontal axis.

Thanks!

Did you select the AimingComponent in the details panel within Unreal?

Hey Dan.
I selected the Aiming Component in the Blueprint editors components tree, the details pane is blank

Thank you

Oh, later on when Ben changes it to adding the AimingComponent in the blueprint rather than C++ you should be able to modify it. Not sure what combination you need to get it to appear there from inheriting it from C++. I tried the obvious UPROPERTY specifiers with no luck.

Ahh ok at least I’ll be able to do what I want then. Would love to know if there is any other way though. I guess you can get mostly the same results by adding it via blueprint and hiding the categories you don’t want designers tweaking.

Cheers

Privacy & Terms