#1. you have Edit specifier with default
1 messages · Page 1 of 1 (latest)
I tried making it Visible, It's still not working, Is there a way to Check and Load the Component Manually?
post code of creation and where you trying to access component as text.
what you see in debugger, you can view object flags (if it is null, a cdo or archetype or some other instance)
try recreating blueprint after changing from Edit to Visible specifier (as you may have corrupted asset), and do not revert it to Edit
I cleaned the Temp Files and Took a Fresh Build, Still no luck.
UCombatComponent* GetCombatComponent() const { return Combat; }
This is the Function in the BaseClass
GetCombatComponent()->OnPressAttack();
This is the Line where I'm calling a Function from the Child Class
that is irrelevant, only asset is important
what you see in debugger, what state of component before the call
RF_Public | RF_Transactional | RF_ArchetypeObject | RF_DefaultSubObject
I See these Flags right before I call the Function for Attack
where you calling onpressattack
thats a template object, it should never be in live instance. it will have only default/base values
the Line GetCombatComponent()->OnPressAttack(); Is called on the Child Class that inherits from the Base Class.
in what function ? beginplay? input handler ? c++ constructor? what call stack you have
two options
- you call it in wrong place
- your blueprint (if you have one) or placed actor in level is corrupted
From the Input-Binded Function.
And It's Called on Player which is spawned at Runtime.
then review the blueprint
Yeah man, You're right, The BP is Corrupted. But How to avoid such a Thing as Right now it's pretty early so I can redo all these stuff but later it might be such a huge chore to do this.
never use Edit with Actor Components Pointer properties