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.
Okay, I hate to be a bother and I understand that this was posted only 2 days ago, but this is seriously annoying me.
Someone posted a question 10 hours ago and got an answer + comments within two hours of him posting, where I haven’t gotten anything.
I mean, do you guys need more information or something? Is there possibly any misunderstanding going on? I can’t do these things if nobody tells me what they need to help.
Thanks for the answer! I’ll try those once I get home from work. As far as I read from that link, it seems that implicit typecasting isn’t really a thing with UProperties then.
So far, I’m thinking that the issue is likely solved by explicit typecasting, but I’ll see for myself.
As a side-note, I asked a friend and he said to use Blueprints instead of C++, despite me saying I refused to use them. R.I.P. Proper Coding Practices.
I had to put #include "Components/StaticMeshComponent.h" in MyPawn.cpp. I think the problem is because with out the include StaticMeshComponent is treated as an incomplete type and it doesn’t know how to implicitly cast it.
If anyone knows better I’d be interested to hear. I’m only guessing from a quick google and some testing in visual studio.