Download

Weird glitch on Set Child Actor Class

I have an Actor blue print with a child actor component that randomly changes on spawn from an array variable of actor classes stored on the game instance. The issue is that, as it spawns, some times it does not populate the class actor. Interestingly, if I set the actor class manually (without the need to access the game instance for the array) it populates the child actor class without issues.

I figured it out… The length was returning a value of 5, which is 1 above the actual array since arrays start from 0.