the effect of changing properties on BillboardCompoent can't be seen when played in Editor

Hi,

I add an billboard component on my customized actor, and try to change some properties on the billboard component when the condition is meet. But it’s weird that it seems to make sense only when play in standalone.

Main code:

AMyActor::AMyActor(const FObjectInitializer & ObjectInitializer)
	: Super(ObjectInitializer)
{

	...

	SpriteComponent = CreateDefaultSubobject<UBillboardComponent>(TEXT("Sprite")); //UBillboardComponent* SpriteComponent
	if (SpriteComponent)
	{
		static ConstructorHelpers::FObjectFinder<UTexture2D> SpriteObj(TEXT("/Engine/EditorResources/S_Actor.S_Actor"));
		SpriteComponent->SetRelativeLocation(FVector(0, 0, 100));
		SpriteComponent->SetHiddenInGame(false);
		SpriteComponent->SetSprite(SpriteObj.Object);
		SpriteComponent->SetupAttachment(RootComponent);
		SpriteComponent->Mobility = EComponentMobility::Movable;
	}

	...
}

void SetBillboardProperties(bool NewVisibility, UTexture2D* NewTex)
{
	SpriteComponent.SetVisibility(NewVisibility);
	SpriteComponent.SetSprite(NewTex);
}

When SetBillboardProperties(bool NewVisibility, UTexture2D* NewTex) is called, it renders the right effect only in StandAlone mode.

Could anyone give me help?
Appreciate any respone :slight_smile: