hello, how can I get UTextBlock to create within my UUserWidget class from another script? I want to get UTextBlock in my AActor class.
Here is an example:
so I get any variable or component from a class gameinstance in my actor class:
UMyGameInstance* GameInstance = Cast<UMyGameInstance>(GetGameInstance());
GameInstance->YourComponent
so I get any variable or component from a character class in my actor class:
APlayer* MyPlayerCharacter;
for (TActorIterator<APlayer> ActorIt(()); ActorIt; ++ActorIt) {
MyPlayerCharacter = *ActorIt;
MyPlayerCharacter->YourComponent
break;
}
I just want to change from my class AActor the text of my UTextBlock hosted in my UUserWidget class since I have to use SetText