UE4 Actor constructor
So i Wanted an actor class to contain another actor , so i have 2 actors one called Aapples and ATree.
Aapples is just a actor generated code by editor.
Atree code here it is :
this generates this error : `Error 1 error : In Tree: Missing '*' in Expected a pointer type
So i replaced it with pointers to object so later i can initalize them in my code so i changed it to : Aapple* apples
But i dont know how to initalize apples in the code i tried this in Tree.cpp : in middle of code: apple = new Aapple();
ofcourse there is no constructor with this arguments as all actor constructors are like this :
So i tried this apples= new Aapple(PCIP); but PCIP is not defiend , so how do i initalize an acotr class ?
Also, make sue you call that in BeginPlay() and not the constructor, because the world will not be valid in the constructor and crash.
answered Aug 22 '14 at 01:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here