Advertisement
KTVX94

OurPlayerController.cpp

Oct 16th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #include "OurPlayerController.h"
  4. #include "Blueprint/UserWidget.h"
  5.  
  6.  
  7. void AOurPlayerController::BeginPlay()
  8. {
  9. Super::BeginPlay();
  10. if (widgetMenu)
  11. {
  12. UE_LOG(LogTemp, Warning, TEXT("Hay widget menu"));
  13.  
  14. menu = CreateWidget<UUserWidget>(this, widgetMenu);
  15. if (menu)
  16. {
  17. menu->AddToViewport();
  18. if (mainCharacter) menu.hitPoints = mainCharacter.life; //Aca me tira error por el menu y por main character
  19.  
  20. UE_LOG(LogTemp, Warning, TEXT("Hay menu"));
  21. }
  22.  
  23. bShowMouseCursor = true;
  24.  
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement