You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156 [CL 16163576 by aurel cordonnier in ue5-main branch]
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/GCObject.h"
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// FEditorObjectTracker
|
|
|
|
class FEditorObjectTracker : public FGCObject
|
|
{
|
|
public:
|
|
FEditorObjectTracker(bool bInAllowOnePerClass = true)
|
|
: bAllowOnePerClass(bInAllowOnePerClass)
|
|
{}
|
|
|
|
// FGCObject interface
|
|
virtual void AddReferencedObjects( FReferenceCollector& Collector ) override;
|
|
virtual FString GetReferencerName() const override
|
|
{
|
|
return TEXT("FEditorObjectTracker");
|
|
}
|
|
// End of FGCObject interface
|
|
|
|
/** Returns an existing editor object for the specified class or creates one
|
|
if none exist */
|
|
UObject* GetEditorObjectForClass( UClass* EdClass );
|
|
|
|
void SetAllowOnePerClass(bool bInAllowOnePerClass)
|
|
{
|
|
bAllowOnePerClass = bInAllowOnePerClass;
|
|
}
|
|
private:
|
|
|
|
/** If true, it uses TMap, otherwise, it just uses TArray */
|
|
bool bAllowOnePerClass;
|
|
|
|
/** Tracks editor objects created for details panel */
|
|
TMap< UClass*, UObject* > EditorObjMap;
|
|
|
|
/** Tracks editor objects created for detail panel */
|
|
TArray<UObject*> EditorObjectArray;
|
|
};
|