Sfoglia il codice sorgente

Add initial support for assigning UUIDs from AzToolsFramework.

Update UuidManager to handle incomplete entries

Signed-off-by: amzn-mike <[email protected]>
amzn-mike 2 anni fa
parent
commit
56e1a8482c

+ 3 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp

@@ -79,6 +79,7 @@
 #include <AzToolsFramework/Script/LuaSymbolsReporterSystemComponent.h>
 #include <Metadata/MetadataManager.h>
 #include <Prefab/ProceduralPrefabSystemComponent.h>
+#include <AzToolsFramework/Metadata/UuidUtils.h>
 
 #include <QtWidgets/QMessageBox>
 AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 4251: 'QFileInfo::d_ptr': class 'QSharedDataPointer<QFileInfoPrivate>' needs to have dll-interface to be used by clients of class 'QFileInfo'
@@ -89,6 +90,7 @@ AZ_POP_DISABLE_WARNING
 #include <QJsonObject>
 #include <QMap>
 
+
 // Not possible to use AZCore's operator new overrides until we address the overall problems
 // with allocators, or more likely convert AzToolsFramework to a DLL and restrict overloading to
 // within the DLL. Since this is currently linked as a lib, overriding new and delete would require
@@ -302,6 +304,7 @@ namespace AzToolsFramework
                 azrtti_typeid<AzToolsFramework::Script::LuaEditorSystemComponent>(),
                 azrtti_typeid<AzToolsFramework::GlobalPaintBrushSettingsSystemComponent>(),
                 azrtti_typeid<AzToolsFramework::MetadataManager>(),
+                azrtti_typeid<AzToolsFramework::UuidUtilComponent>(),
             });
 
         return components;

+ 2 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/AzToolsFrameworkModule.cpp

@@ -62,6 +62,7 @@
 #include <AzToolsFramework/Viewport/ViewBookmarkSystemComponent.h>
 #include <Metadata/MetadataManager.h>
 #include <Prefab/ProceduralPrefabSystemComponent.h>
+#include <AzToolsFramework/Metadata/UuidUtils.h>
 
 AZ_DEFINE_BUDGET(AzToolsFramework);
 
@@ -123,6 +124,7 @@ namespace AzToolsFramework
             AzToolsFramework::Script::LuaEditorSystemComponent::CreateDescriptor(),
             AzToolsFramework::GlobalPaintBrushSettingsSystemComponent::CreateDescriptor(),
             AzToolsFramework::MetadataManager::CreateDescriptor(),
+            AzToolsFramework::UuidUtilComponent::CreateDescriptor(),
         });
     }
 }

+ 3 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/Metadata/MetadataManager.cpp

@@ -14,6 +14,7 @@
 #include <AzCore/Serialization/Json/StackedString.h>
 #include <AzCore/JSON/pointer.h>
 #include <AzCore/Component/ComponentApplicationBus.h>
+#include <AzToolsFramework/Metadata/UuidEntry.h>
 
 namespace AzToolsFramework
 {
@@ -24,6 +25,8 @@ namespace AzToolsFramework
             // Note the version here is not the same as the MetadataFile version, since this is a separate serialization
             serializeContext->Class<MetadataManager, AZ::Component>()->Version(1);
         }
+
+        UuidEntry::Reflect(context);
     }
 
     bool MetadataManager::GetValue(AZ::IO::PathView file, AZStd::string_view key, void* outValue, AZ::Uuid typeId)

+ 27 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/Metadata/UuidEntry.cpp

@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+#pragma once
+
+#include <AzToolsFramework/Metadata/UuidEntry.h>
+
+namespace AzToolsFramework
+{
+    void AzToolsFramework::UuidEntry::Reflect(AZ::ReflectContext* context)
+    {
+        if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
+        {
+            serializeContext->Class<UuidEntry>()
+                ->Version(0)
+                ->Field("uuid", &UuidEntry::m_uuid)
+                ->Field("legacyUuids", &UuidEntry::m_legacyUuids)
+                ->Field("originalPath", &UuidEntry::m_originalPath)
+                ->Field("creationUnixEpochMS", &UuidEntry::m_millisecondsSinceUnixEpoch);
+        }
+    }
+} // namespace AzToolsFramework

+ 30 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/Metadata/UuidEntry.h

@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+#pragma once
+
+#include <AzCore/Serialization/SerializeContext.h>
+
+namespace AzToolsFramework
+{
+    struct UuidEntry
+    {
+        AZ_TYPE_INFO(UuidEntry, "{FAD60D80-9B1D-421D-A4CA-DD2CA2EA80BB}");
+
+        static void Reflect(AZ::ReflectContext* context);
+
+        // The canonical UUID
+        AZ::Uuid m_uuid;
+        // A list of UUIDs that used to refer to this file
+        AZStd::unordered_set<AZ::Uuid> m_legacyUuids;
+        // The relative path of the file when it was originally created
+        AZStd::string m_originalPath;
+        // Creation time of the UUID entry
+        AZ::u64 m_millisecondsSinceUnixEpoch{};
+    };
+} // namespace AzToolsFramework

+ 73 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/Metadata/UuidUtils.cpp

@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+#include <AzToolsFramework/Metadata/UuidUtils.h>
+#include <AzToolsFramework/Metadata/MetadataManager.h>
+#include <AzToolsFramework/Metadata/UuidEntry.h>
+
+namespace AzToolsFramework
+{
+    void UuidUtilComponent::Reflect(AZ::ReflectContext* context)
+    {
+        if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
+        {
+            serializeContext->Class<UuidUtilComponent, AZ::Component>();
+        }
+    }
+
+    AZ::Uuid UuidUtilComponent::GetSourceUuid(AZ::IO::PathView /*absoluteFilePath*/)
+    {
+        auto* metadataInterface = AZ::Interface<IMetadataRequests>::Get();
+
+        AZ_Assert(metadataInterface, "Programmer Error - IMetadataRequests interface is not available");
+
+        if (!metadataInterface)
+        {
+            return {};
+        }
+
+        // metadataInterface->GetValue(absoluteFilePath, )
+        return {};
+    }
+
+    bool UuidUtilComponent::CreateSourceUuid(AZ::IO::PathView absoluteFilePath, AZ::Uuid uuid)
+    {
+        auto* metadataInterface = AZ::Interface<IMetadataRequests>::Get();
+
+        AZ_Assert(metadataInterface, "Programmer Error - IMetadataRequests interface is not available");
+
+        if (!metadataInterface)
+        {
+            return false;
+        }
+
+        AzToolsFramework::UuidEntry entry;
+
+        if (metadataInterface->GetValue(absoluteFilePath, UuidKey, entry))
+        {
+            // TODO Error
+            return false;
+        }
+
+        entry.m_uuid = uuid;
+
+        return metadataInterface->SetValue(absoluteFilePath, UuidKey, entry);
+    }
+
+    AZ::Uuid UuidUtilComponent::CreateSourceUuid(AZ::IO::PathView absoluteFilePath)
+    {
+        auto uuid = AZ::Uuid::CreateRandom();
+
+        if(CreateSourceUuid(absoluteFilePath, uuid))
+        {
+            return uuid;
+        }
+
+        return {};
+    }
+} // namespace AzToolsFramework

+ 56 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/Metadata/UuidUtils.h

@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) Contributors to the Open 3D Engine Project.
+ * For complete copyright and license terms please see the LICENSE at the root of this distribution.
+ *
+ * SPDX-License-Identifier: Apache-2.0 OR MIT
+ *
+ */
+
+#pragma once
+
+#include <AzCore/Component/Component.h>
+#include <AzCore/Interface/Interface.h>
+#include <AzCore/Serialization/SerializeContext.h>
+
+namespace AzToolsFramework
+{
+    struct IUuid
+    {
+        AZ_RTTI(IUuid, "{C3281F96-430A-49C2-95EF-66505C34CD2E}");
+        virtual ~IUuid() = default;
+
+        //! Gets the UUID for a source asset
+        //! @param absoluteFilePath Absolute path to the source asset
+        //! @return
+        virtual AZ::Uuid GetSourceUuid(AZ::IO::PathView absoluteFilePath) = 0;
+        //! Assigns the provided UUID to a source asset
+        //! @param absoluteFilePath Absolute path to the source asset
+        //! @param uuid Uuid to assign
+        //! @return
+        virtual bool CreateSourceUuid(AZ::IO::PathView absoluteFilePath, AZ::Uuid uuid) = 0;
+        //! Assigns a randomly generated UUID to a source asset
+        //! @param absoluteFilePath Absolute path to the source asset
+        //! @return
+        virtual AZ::Uuid CreateSourceUuid(AZ::IO::PathView absoluteFilePath) = 0;
+    };
+
+    class UuidUtilComponent
+        : public AZ::Component
+        , AZ::Interface<IUuid>::Registrar
+    {
+    public:
+        AZ_COMPONENT(UuidUtilComponent, "{357CAA8E-CDDB-4094-8C2A-669D3D33E308}");
+
+        static constexpr const char* UuidKey = "/UUID";
+
+        static void Reflect(AZ::ReflectContext* context);
+
+        AZ::Uuid GetSourceUuid(AZ::IO::PathView absoluteFilePath) override;
+        bool CreateSourceUuid(AZ::IO::PathView absoluteFilePath, AZ::Uuid uuid) override;
+        AZ::Uuid CreateSourceUuid(AZ::IO::PathView absoluteFilePath) override;
+
+        // Inherited via Component
+        void Activate() override{}
+        void Deactivate() override{}
+    };
+} // namespace AzToolsFramework

+ 4 - 0
Code/Framework/AzToolsFramework/AzToolsFramework/aztoolsframework_files.cmake

@@ -261,6 +261,10 @@ set(FILES
     Manipulators/TranslationManipulators.h
     Metadata/MetadataManager.h
     Metadata/MetadataManager.cpp
+    Metadata/UuidUtils.h
+    Metadata/UuidUtils.cpp
+    Metadata/UuidEntry.h
+    Metadata/UuidEntry.cpp
     Maths/TransformUtils.h
     PaintBrush/PaintBrushSubModeCluster.cpp
     PaintBrush/PaintBrushSubModeCluster.h

+ 3 - 1
Code/Tools/AssetProcessor/AssetBuilder/AssetBuilderApplication.cpp

@@ -30,6 +30,8 @@
 #include <AzToolsFramework/Prefab/PrefabSystemComponent.h>
 #include <AzToolsFramework/Slice/SliceMetadataEntityContextComponent.h>
 #include <AzToolsFramework/ToolsComponents/ToolsAssetCatalogComponent.h>
+#include <AzToolsFramework/Metadata/MetadataManager.h>
+#include <AzToolsFramework/Metadata/UuidUtils.h>
 
 #include <AssetBuilderSDK/AssetBuilderSDK.h>
 #include <AssetBuilderApplication.h>
@@ -38,7 +40,6 @@
 #include <AzCore/Interface/Interface.h>
 #include <Entity/EntityUtilityComponent.h>
 #include <AssetBuilderStatic.h>
-#include <Metadata/MetadataManager.h>
 
 namespace AssetBuilder
 {
@@ -85,6 +86,7 @@ AZ::ComponentTypeList AssetBuilderApplication::GetRequiredSystemComponents() con
         azrtti_typeid<AzToolsFramework::Prefab::PrefabSystemComponent>(),
         azrtti_typeid<AzToolsFramework::EntityUtilityComponent>(),
         azrtti_typeid<AzToolsFramework::MetadataManager>(),
+        azrtti_typeid<AzToolsFramework::UuidUtilComponent>(),
         });
 
     return components;

+ 1 - 1
Code/Tools/AssetProcessor/native/resourcecompiler/rcjob.cpp

@@ -795,7 +795,7 @@ namespace AssetProcessor
                 AZ_Error(
                     AssetProcessor::ConsoleChannel, false,
                     "Product asset outputs are not currently supported for the %s platform.  "
-                    "Either change the Job platform a normal platform or change the output flag to AssetBuilderSDK::ProductOutputFlags::IntermediateAsset",
+                    "Either change the Job platform to a normal platform or change the output flag to AssetBuilderSDK::ProductOutputFlags::IntermediateAsset",
                     AssetBuilderSDK::CommonPlatformName);
                 return false;
             }

+ 42 - 0
Code/Tools/AssetProcessor/native/tests/UuidManagerTests.cpp

@@ -38,6 +38,7 @@ namespace UnitTests
 
             AZ::JsonSystemComponent::Reflect(m_jsonRegistrationContext.get());
 
+            AzToolsFramework::MetadataManager::Reflect(m_serializeContext.get());
             AssetProcessor::UuidManager::Reflect(m_serializeContext.get());
 
             m_uuidInterface = AZ::Interface<AssetProcessor::IUuidRequests>::Get();
@@ -368,4 +369,45 @@ namespace UnitTests
 
         EXPECT_TRUE(uuidRetry.IsNull());
     }
+
+    TEST_F(UuidManagerTests, GetUuid_IncompleteMetadataFile_ReturnsAndUpdates)
+    {
+        static constexpr AZ::IO::FixedMaxPath TestFile = "c:/somepath/mockfile.txt";
+        static constexpr AZ::IO::FixedMaxPath MetadataFile = TestFile.Native() + AzToolsFramework::MetadataManager::MetadataFileExtension;
+
+        MakeFile(TestFile);
+
+        static constexpr AZ::Uuid testUuid{ "{2EE0C7C2-F21E-4254-A180-174992819254}" };
+        AZStd::string contents = AZStd::string::format("{\"UUID\": {\"uuid\": \"%s\"}}", testUuid.ToFixedString().c_str());
+
+        AZ::Utils::WriteFile(contents, MetadataFile.Native());
+
+        auto uuidRetry = m_uuidInterface->GetUuid(AssetProcessor::SourceAssetReference(TestFile));
+
+        EXPECT_EQ(uuidRetry, testUuid);
+
+        auto legacyIds = m_uuidInterface->GetLegacyUuids(AssetProcessor::SourceAssetReference(TestFile));
+
+        EXPECT_EQ(legacyIds.size(), 1);
+    }
+
+    TEST_F(UuidManagerTests, GetUuid_MetadataFileNoUuid_Fails)
+    {
+        static constexpr AZ::IO::FixedMaxPath TestFile = "c:/somepath/mockfile.txt";
+        static constexpr AZ::IO::FixedMaxPath MetadataFile = TestFile.Native() + AzToolsFramework::MetadataManager::MetadataFileExtension;
+
+        MakeFile(TestFile);
+
+        static constexpr AZ::Uuid testUuid{ "{2EE0C7C2-F21E-4254-A180-174992819254}" };
+        AZStd::string contents = AZStd::string::format("{\"UUID\": {\"originalPath\": \" " AZ_STRING_FORMAT " \"}}", AZ_STRING_ARG(TestFile.Filename().Native()));
+
+        AZ::Utils::WriteFile(contents, MetadataFile.Native());
+
+        TraceBusErrorChecker errorChecker;
+        errorChecker.Begin();
+        auto uuidRetry = m_uuidInterface->GetUuid(AssetProcessor::SourceAssetReference(TestFile));
+        errorChecker.End(1);
+
+        EXPECT_TRUE(uuidRetry.IsNull());
+    }
 }

+ 2 - 0
Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp

@@ -1306,6 +1306,8 @@ namespace AssetProcessor
             visitor.m_metaDataTypes.push_back({ AZStd::string::format("%s.assetinfo", entry.c_str()), entry });
         }
 
+        AddMetaDataType("meta", "");
+
         for (const auto& metaDataType : visitor.m_metaDataTypes)
         {
             QString fileType = AssetUtilities::NormalizeFilePath(QString::fromUtf8(metaDataType.m_fileType.c_str(),

+ 40 - 22
Code/Tools/AssetProcessor/native/utilities/UuidManager.cpp

@@ -17,23 +17,9 @@ namespace AssetProcessor
 {
     void UuidManager::Reflect(AZ::ReflectContext* context)
     {
-        UuidEntry::Reflect(context);
         UuidSettings::Reflect(context);
     }
 
-    void UuidManager::UuidEntry::Reflect(AZ::ReflectContext* context)
-    {
-        if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
-        {
-            serializeContext->Class<UuidEntry>()
-                ->Version(0)
-                ->Field("uuid", &UuidEntry::m_uuid)
-                ->Field("legacyUuids", &UuidEntry::m_legacyUuids)
-                ->Field("originalPath", &UuidEntry::m_originalPath)
-                ->Field("creationUnixEpochMS", &UuidEntry::m_millisecondsSinceUnixEpoch);
-        }
-    }
-
     void UuidSettings::Reflect(AZ::ReflectContext* context)
     {
         if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
@@ -100,7 +86,7 @@ namespace AssetProcessor
         return file.LexicallyNormal().FixedMaxPathStringAsPosix().c_str();
     }
 
-    UuidManager::UuidEntry UuidManager::GetOrCreateUuidEntry(const SourceAssetReference& sourceAsset)
+    AzToolsFramework::UuidEntry UuidManager::GetOrCreateUuidEntry(const SourceAssetReference& sourceAsset)
     {
         AZStd::scoped_lock scopeLock(m_uuidMutex);
 
@@ -126,11 +112,43 @@ namespace AssetProcessor
         // Metadata manager can't use the file state cache since it is in AzToolsFramework, so it's faster to do an Exists check up-front.
         if (fileExists)
         {
-            UuidEntry uuidInfo;
+            const bool isEnabledType = m_enabledTypes.contains(sourceAsset.AbsolutePath().Extension().Native());
+            AzToolsFramework::UuidEntry uuidInfo;
 
             // Check if there's a metadata file that already contains a saved UUID
-            if (GetMetadataManager()->GetValue(sourceAsset.AbsolutePath(), UuidKey, uuidInfo))
+            if (GetMetadataManager()->GetValue(sourceAsset.AbsolutePath(), AzToolsFramework::UuidUtilComponent::UuidKey, uuidInfo))
             {
+                // Validate the entry - a null UUID is not ok
+                if (uuidInfo.m_uuid.IsNull())
+                {
+                    AZ_Error("UuidManager", false, "Metadata file exists for %s but UUID is missing or invalid", sourceAsset.AbsolutePath().c_str());
+                    return {};
+                }
+
+                // Missing other entries is ok, just generate them now and update the metadata file
+                if (uuidInfo.m_legacyUuids.empty() || uuidInfo.m_originalPath.empty() || uuidInfo.m_millisecondsSinceUnixEpoch == 0)
+                {
+                    AzToolsFramework::UuidEntry regeneratedEntry = CreateUuidEntry(sourceAsset, isEnabledType);
+
+                    if (uuidInfo.m_legacyUuids.empty())
+                    {
+                       uuidInfo.m_legacyUuids = regeneratedEntry.m_legacyUuids;
+                    }
+
+                    if (uuidInfo.m_originalPath.empty())
+                    {
+                        uuidInfo.m_originalPath = regeneratedEntry.m_originalPath;
+                    }
+
+                    if (uuidInfo.m_millisecondsSinceUnixEpoch == 0)
+                    {
+                        uuidInfo.m_millisecondsSinceUnixEpoch = regeneratedEntry.m_millisecondsSinceUnixEpoch;
+                    }
+
+                    // Update the metadata file
+                    GetMetadataManager()->SetValue(sourceAsset.AbsolutePath(), AzToolsFramework::UuidUtilComponent::UuidKey, uuidInfo);
+                }
+
                 m_uuids[normalizedPath] = uuidInfo;
 
                 return uuidInfo;
@@ -147,11 +165,11 @@ namespace AssetProcessor
             return {};
         }
 
-        const bool isEnabledType = m_enabledTypes.contains(sourceAsset.AbsolutePath().Extension().Native());
         // Last resort - generate a new UUID and save it to the metadata file
-        UuidEntry newUuid = CreateUuidEntry(sourceAsset, isEnabledType);
+        AzToolsFramework::UuidEntry newUuid = CreateUuidEntry(sourceAsset, isEnabledType);
 
-        if (!isEnabledType || GetMetadataManager()->SetValue(sourceAsset.AbsolutePath(), UuidKey, newUuid))
+        if (!isEnabledType ||
+            GetMetadataManager()->SetValue(sourceAsset.AbsolutePath(), AzToolsFramework::UuidUtilComponent::UuidKey, newUuid))
         {
             m_uuids[normalizedPath] = newUuid;
 
@@ -171,9 +189,9 @@ namespace AssetProcessor
         return m_metadataManager;
     }
 
-    UuidManager::UuidEntry UuidManager::CreateUuidEntry(const SourceAssetReference& sourceAsset, bool enabledType)
+    AzToolsFramework::UuidEntry UuidManager::CreateUuidEntry(const SourceAssetReference& sourceAsset, bool enabledType)
     {
-        UuidEntry newUuid;
+        AzToolsFramework::UuidEntry newUuid;
 
         newUuid.m_uuid = enabledType ? CreateUuid() : AssetUtilities::CreateSafeSourceUUIDFromName(sourceAsset.RelativePath().c_str());
         newUuid.m_legacyUuids = CreateLegacyUuids(sourceAsset.RelativePath().c_str());

+ 6 - 20
Code/Tools/AssetProcessor/native/utilities/UuidManager.h

@@ -12,7 +12,9 @@
 #include <AzCore/Interface/Interface.h>
 #include <AzCore/std/containers/unordered_set.h>
 #include <AzCore/std/string/string.h>
+#include <AzToolsFramework/Metadata/UuidUtils.h>
 #include <native/AssetManager/SourceAssetReference.h>
+#include <AzToolsFramework/Metadata/UuidEntry.h>
 
 namespace AzToolsFramework
 {
@@ -61,7 +63,7 @@ namespace AssetProcessor
     public:
         AZ_RTTI(UuidManager, "{49FA0129-7272-4256-A5C6-D789C156E6BA}", IUuidRequests);
 
-        static constexpr const char* UuidKey = "/UUID";
+
 
         static void Reflect(AZ::ReflectContext* context);
 
@@ -72,33 +74,17 @@ namespace AssetProcessor
         void EnableGenerationForTypes(AZStd::unordered_set<AZStd::string> types) override;
 
     private:
-        struct UuidEntry
-        {
-            AZ_TYPE_INFO(UuidEntry, "{FAD60D80-9B1D-421D-A4CA-DD2CA2EA80BB}");
-
-            static void Reflect(AZ::ReflectContext* context);
-
-            // The canonical UUID
-            AZ::Uuid m_uuid;
-            // A list of UUIDs that used to refer to this file
-            AZStd::unordered_set<AZ::Uuid> m_legacyUuids;
-            // The relative path of the file when it was originally created
-            AZStd::string m_originalPath;
-            // Creation time of the UUID entry
-            AZ::u64 m_millisecondsSinceUnixEpoch;
-        };
-
         AZStd::string GetCanonicalPath(AZ::IO::PathView file);
-        UuidEntry GetOrCreateUuidEntry(const SourceAssetReference& sourceAsset);
+        AzToolsFramework::UuidEntry GetOrCreateUuidEntry(const SourceAssetReference& sourceAsset);
         AzToolsFramework::IMetadataRequests* GetMetadataManager();
-        UuidEntry CreateUuidEntry(const SourceAssetReference& sourceAsset, bool enabledType);
+        AzToolsFramework::UuidEntry CreateUuidEntry(const SourceAssetReference& sourceAsset, bool enabledType);
         AZ::Uuid CreateUuid();
         AZStd::unordered_set<AZ::Uuid> CreateLegacyUuids(const AZStd::string& file);
         void InvalidateCacheEntry(AZ::IO::FixedMaxPath file);
 
         AZStd::recursive_mutex m_uuidMutex;
         // Cache of uuids.  AbsPath -> UUIDEntry
-        AZStd::unordered_map<AZStd::string, UuidEntry> m_uuids;
+        AZStd::unordered_map<AZStd::string, AzToolsFramework::UuidEntry> m_uuids;
         // Types which should use randomly generated UUIDs
         AZStd::unordered_set<AZStd::string> m_enabledTypes;
         AzToolsFramework::IMetadataRequests* m_metadataManager{};