Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #include "OurPlayerController.h"
- #include "Blueprint/UserWidget.h"
- void AOurPlayerController::BeginPlay()
- {
- Super::BeginPlay();
- if (widgetMenu)
- {
- UE_LOG(LogTemp, Warning, TEXT("Hay widget menu"));
- menu = CreateWidget<UUserWidget>(this, widgetMenu);
- if (menu)
- {
- menu->AddToViewport();
- if (mainCharacter) menu.hitPoints = mainCharacter.life; //Aca me tira error por el menu y por main character
- UE_LOG(LogTemp, Warning, TEXT("Hay menu"));
- }
- bShowMouseCursor = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement