Fixed broken ModelAsset Details Customization (not showing customization for ModelAsset) + Added TODO comment on StageRanking StartTime computation has the method is opsque

This commit is contained in:
2025-07-12 09:27:02 +02:00
parent 0d851b7298
commit d7a189f905
2 changed files with 15 additions and 0 deletions

View File

@ -100,6 +100,20 @@ void FDTFluxModelAssetCustomization::CustomizeDetailsWithoutRawDataAsset(IDetail
void FDTFluxModelAssetCustomization::CustomizeDetailsWithRawDataAccess(IDetailLayoutBuilder& DetailBuilder) void FDTFluxModelAssetCustomization::CustomizeDetailsWithRawDataAccess(IDetailLayoutBuilder& DetailBuilder)
{ {
// Edit object
TArray<TWeakObjectPtr<UObject>> ObjectsBeingCustomized;
DetailBuilder.GetObjectsBeingCustomized(ObjectsBeingCustomized);
if (ObjectsBeingCustomized.Num() > 0)
{
ModelAsset = Cast<UDTFluxModelAsset>(ObjectsBeingCustomized[0].Get());
}
if (!ModelAsset.IsValid())
{
UE_LOG(LogTemp, Error, TEXT("No valid DTFluxModelAsset found"));
return;
}
// ===== WIDGET PRINCIPAL ===== // ===== WIDGET PRINCIPAL =====
IDetailCategoryBuilder& MainCategory = DetailBuilder.EditCategory( IDetailCategoryBuilder& MainCategory = DetailBuilder.EditCategory(
"DTFlux Model Explorer", "DTFlux Model Explorer",

View File

@ -165,6 +165,7 @@ struct FDTFluxStageRankings : public FDTFluxDetailedRankings
Ranking.TimeStart.ParseIntoArray(Exploded, TEXT(":"), true); Ranking.TimeStart.ParseIntoArray(Exploded, TEXT(":"), true);
if (Exploded.Num() == 3) if (Exploded.Num() == 3)
{ {
//TODO: Pas sur que ce soit super de le mettre à ce jour ???
FDateTime Now = FDateTime::Now(); FDateTime Now = FDateTime::Now();
RankingStartTime = FDateTime(Now.GetYear(), Now.GetMonth(), Now.GetDay(), RankingStartTime = FDateTime(Now.GetYear(), Now.GetMonth(), Now.GetDay(),
FCString::Atoi(*Exploded[0]), FCString::Atoi(*Exploded[1]), FCString::Atoi(*Exploded[0]), FCString::Atoi(*Exploded[1]),