Download

Help! blueprint actor's self reference is none..... Accessed none trying to read property.....

Hi!

I made a c++ class “myActor” inherited from actor class.

And i created a blueprint actor from this myActor class, named myActor_BP.

In myActor_BP blueprint, i want to add ArrowComponent dynamically and make it reusable. So i made a macro function to create ArrowComponent . i think i can call this macro function and pass myActor_BP’s self reference into this macro function to

create ArrowComponent by using “Add Arrow Component” function,but i got “Accessed None trying to read property” message when play this level. I checked macro function blueprint code , and founded myActor_BP’s self reference which passed

from myActor_BP is none!!!

But when i moved macro function code into myActor_BP, everything is ok, the ArrowComponent added correctly.

So, how can i fix this problem???

Thanks.

I recode the macro function, and the myActor_BP’s self reference is not none, and is valid. but i still got" Accessed None trying to read property" message, and the ArrowComponent didn’t create.