Actor not updating (when instancing on c++)

My custom actor (containing a few custom UMeshComponent) does not update when I change its location or the visibility of its components.

I instantiate it this way in StartPlay() of my GameMode class:

  MyCustomActor = GetWorld()->SpawnActor<AMyCustomActor>(AMyCustomActor::StaticClass());

Then I set its new location like this:

  MyCustomActor->SetActorLocation(FVector(100,0,0));

Is it because I did not set the Owner? Or what is wrong?

Hey -

I was able to use the two lines of code you posted inside my custom game mode to spawn an actor at the set location. Did you set the GameMode Override to your custom game mode in the editor world settings? Where are you calling your SetActorLocation() from? Can you post the full files for your actor and game mode?

Cheers

Hi ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.