C++ custom component can not see/edit defaults unless added in BP
Hi, banging my head against this, maybe someone can help.
I have a newly created component derrived from UStaticMeshComponent (I use a mesh overlap as the start of the aiming system). When i add it to my player controller in c++, the details panel is blank, when i add it via blueprint, it is populated properly, i have no idea why.
header file for player controller has this code:
cpp file has this
if i add my component via BP editor, i see all the details i would expect so i assume my problem is with the c++ bit above. Weird thing is though that i duplicated this code for adding a dummy static mesh component and i could see its details fine.
Any help or pointers on where to start looking would really help.
asked Sep 23 '18 at 05:11 AM in C++ Programming
Did you use hot reload? While this can be fine when modifying a bit the core of some functions when adding new features it can be a bit faulty. I usually quit the editor and do my modifications / implementations and then relaunch to test the whole thing. When my cpp classes are inherited or else I tend to reparent everything and basically just redo the whole import and such. C++ is not awesome for updating it's own changes on the run unlike scripted languages.
answered Sep 23 '18 at 01:46 PM
So somehow my BP version of my player controller had got itself into a strange state. Making a new one seems to have fixed the issue. A bit worrying though. If anyone knows how i might have recovered from this without having to delete and rrecreate the BP that would be really useful.
answered Sep 23 '18 at 05:34 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here