March 2019
Intermediate to advanced
708 pages
17h 9m
English
// Called when the game starts or when spawnedvoid AParamDelegateListener::BeginPlay(){ Super::BeginPlay(); UWorld* TheWorld = GetWorld(); if (TheWorld != nullptr) { AGameModeBase* GameMode = UGameplayStatics::GetGameMode(TheWorld); AChapter_05GameModeBase * MyGameMode = Cast<AChapter_05GameModeBase> (GameMode); if (MyGameMode != nullptr) { MyGameMode->MyParameterDelegate.BindUObject(this, &AParamDelegateListener::SetLightColor, false); } } }
UCLASS()class CHAPTER_05_API AParamDelegateListener : public AActor{ GENERATED_BODY() ...Read now
Unlock full access