Files
UnrealEngine/Engine/Source/Runtime/CoreUObject/Tests/ClassDefaultObjectTest.h
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

30 lines
583 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#if WITH_TESTS
#include "UObject/Object.h"
#include "ClassDefaultObjectTest.generated.h"
UCLASS()
class UClassDefaultObjectTest : public UObject
{
GENERATED_BODY()
public:
int32 NumPostInitProperties = 0;
// PostInitProperties is called before RF_NeedInitialization is removed
// so its a good place to modify a non-atomic value to see if there is
// any race during default object construction.
virtual void PostInitProperties()
{
Super::PostInitProperties();
NumPostInitProperties++;
}
};
#endif