optimization some umg

This commit is contained in:
martinluckyrobots
2025-04-14 19:36:02 +08:00
parent 6a50b86363
commit 144b3e3bce
27 changed files with 414 additions and 10 deletions

View File

@ -0,0 +1,36 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "Gameplay/NaviSplineCreator.h"
#include "Core/LuckyRobotsGameInstance.h"
// Sets default values
ANaviSplineCreator::ANaviSplineCreator()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void ANaviSplineCreator::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ANaviSplineCreator::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void ANaviSplineCreator::UpdateSplineVisibility()
{
ULuckyRobotsGameInstance* GameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance());
if (GameInstance)
{
SetActorHiddenInGame(!GameInstance->bIsShowPath);
}
}