Customize a Pawn Tutorial OurVisibleComponent Error
Hey there, I noticed that the tutorial for "Customize a Pawn" is made for Unreal Engine 4.9. I'm a bit new to the engine and I couldn't find an answer online.
The tutorial asks you to set OurVisibleComponent (A pointer to a USceneComponent) to a UStaticMeshComponent, which logically shouldn't happen at all.
Of course, Visual Studio picks up on this and instantly marks it as an error as well.
I'm a bit unfamiliar with some UE4, so is there any form of code that I can write to fix this error? Thanks in advance!
asked Jul 19 '17 at 09:33 PM in C++ Programming
Does it not compile? I tried that and it compiles fine for me. You can ignore the Intellisense errors if it compiles.
If it isn't compiling for you for some strange reason you could try declaring the "OurVisibleComponent" as a UStaticMeshComponent instead.
Or you could try casting as suggested here: https://answers.unrealengine.com/questions/359380/cant-set-pointer-to-derived-type.html
answered Jul 22 '17 at 08:14 AM
I had to put
If anyone knows better I'd be interested to hear. I'm only guessing from a quick google and some testing in visual studio.
Follow this question
Once you sign in you will be able to subscribe for any updates here