Logo
Explore Help
Sign In
izzy/UnrealEngineUWP
0
0
Fork 0
You've already forked UnrealEngineUWP
mirror of https://github.com/izzy2lost/UnrealEngineUWP.git synced 2026-03-26 18:15:20 -07:00
Code Issues Packages Projects Releases Wiki Activity
Files
3c2010d281269994deefcc86297a79247a9aeb34
UnrealEngineUWP/Engine/Source/Editor/PropertyEditor/Private/DetailsViewConfig.cpp

20 lines
346 B
C++
Raw Normal View History

Editor configs now correctly diff against the CDO when serializing. Previously, I had assumed that FProperty::InitializeValue() would initialize a simple member (eg. a float) to the correct value, but this appears not to be the case, rather values are zero-initialized and the CDO stores the correct default values. In the case of structs, InitializeStruct() does in fact initialize correctly. However, this means that we can't use GetMutableDefault() to get an instance of the UObject, since then we're changing what we're diffing against and serialize no values. Changed the usages of this pattern to use singletons instead. #jira UE-141150 #review-19900014 @lauren.barnes, @aditya.ravichandran #preflight 6267fa44a021c91a50f26a65 [CL 19919719 by sebastian nordgren in ue5-main branch]
2022-04-26 10:20:56 -04:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "DetailsViewConfig.h"
TObjectPtr<UDetailsConfig> UDetailsConfig::Instance = nullptr;
void UDetailsConfig::Initialize()
{
if (Instance == nullptr)
{
Instance = NewObject<UDetailsConfig>();
Instance->AddToRoot();
}
}
UDetailsConfig* UDetailsConfig::Get()
{
return Instance;
}
Reference in New Issue Copy Permalink
Powered by Gitea Page: 337ms Template: 10ms
English
English
Licenses API