#1. you have Edit specifier with default

1 messages · Page 1 of 1 (latest)

outer berry
#

I tried making it Visible, It's still not working, Is there a way to Check and Load the Component Manually?

quiet skiff
#

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

outer berry
#

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

quiet skiff
#

what you see in debugger, what state of component before the call

outer berry
#

RF_Public | RF_Transactional | RF_ArchetypeObject | RF_DefaultSubObject

I See these Flags right before I call the Function for Attack

quiet skiff
#

where you calling onpressattack

#

thats a template object, it should never be in live instance. it will have only default/base values

outer berry
#

the Line GetCombatComponent()->OnPressAttack(); Is called on the Child Class that inherits from the Base Class.

quiet skiff
#

in what function ? beginplay? input handler ? c++ constructor? what call stack you have

#

two options

  1. you call it in wrong place
  2. your blueprint (if you have one) or placed actor in level is corrupted
outer berry
#

From the Input-Binded Function.

#

And It's Called on Player which is spawned at Runtime.

quiet skiff
#

then review the blueprint

outer berry
#

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.

quiet skiff
#

never use Edit with Actor Components Pointer properties