Adding ChildActorComponent makes my game unplayable

i have added two ChildActorComponents to my player character class, while adding it unreal would crash occasionally depending on what i would parent it to.

after finally getting the childactors placed right and all variables tied up correctly. now if i add another component of any kind the game will crash on clicking play. even if i have saved and compiled the player character class.

the child actors are two ‘weapon arms’ that will hold the weapons for my player character.

what is the best method for adding actors to another?

can you post a screenshot of your player character class? Also, what is the parent class of it ?

So turns out (after indiscriminate deletion of nearly all my variables through a process of utmost stupid human rage) i have found that …

it is a big “NO NO” to have a child actor that has a variable of the
parent class in any fashion.

i can refer to player controller and pull out the character class from it (via casting owning pawn to my custom character class) but i can not under any circumstance be allowed to save that cast as a variable (which i did in a hopes to reduce type casting every tick)

so now i must make some weird functions in my controller to talk between the playercharacter and the playercharacters weapon arms…or i guess i should just learn interfaces :wink:

Im going to count this AS the ANSWER but i would love it if someone would tell me a better, more efficient method of communicating between parent and child actors.

the parent class of my custom character class is character.

NOPE… still crashes just now during compiling either the weapon or the weapon arm class.

heres the crash report:

!Id:8ee9eeadd8370cce6023baa36a3a5c8c

Unknown exception - code 00000001
(first/second chance not available)

Assertion failed:
((UObject*)ContainerPtr)->IsA((UClass*)GetOuter())
[File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.4\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h]
[Line: 351] ‘WeaponArm_C_0’ is of
class ‘WeaponArm_C’ ho

KERNELBASE + 37901 bytes
UE4Editor_Core + 3095292 bytes
UE4Editor_Core + 1661738 bytes
UE4Editor_Core + 1541824 bytes