Preapre codebase for FileRequest compiletime improvements (#6192)

* Preapre codebase for FileRequest compiletime improvements

This is preparing grounds for the next PR that will contain the 'meat'
of the changes.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove spurious newline.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
Artur K
2021-12-10 14:08:24 +01:00
committed by GitHub
parent 633a9e939a
commit 53b88d4752
47 changed files with 3739 additions and 3777 deletions
@@ -404,7 +404,7 @@ namespace ScriptCanvasEditor
// This updates the asset Id with the canonical assetId on SourceFileChanged
// This occurs for new ScriptCanvas assets because before the SC asset is saved to disk, the asset database
// has no asset Id associated with it, so this uses the supplied source path to find the asset Id registered
// has no asset Id associated with it, so this uses the supplied source path to find the asset Id registered
AZStd::string fullPath;
AzFramework::StringFunc::Path::Join(scanFolder.data(), relativePath.data(), fullPath);
AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::NormalizePath, fullPath);
@@ -117,10 +117,10 @@ namespace ScriptCanvasEditor
// once the file is saved to file, its asset ID will be changed, if the file is to remain
// open, we need to update the source AssetId to correspond to the file asset.
//
// The other is when an asset is loaded, we clone the asset from file and use an in-memory
// version of the asset until it is time to save, at that moment we need to save to the
// The other is when an asset is loaded, we clone the asset from file and use an in-memory
// version of the asset until it is time to save, at that moment we need to save to the
// source file
class ScriptCanvasMemoryAsset
class ScriptCanvasMemoryAsset
: public MemoryAsset<ScriptCanvas::ScriptCanvasAssetBase>
, public AZStd::enable_shared_from_this<ScriptCanvasMemoryAsset>
, EditorGraphNotificationBus::Handler
@@ -245,7 +245,7 @@ namespace ScriptCanvasEditor
return m_inMemoryAsset;
}
// Upon loading a graph, we clone the source data and we replace the loaded asset with
// Upon loading a graph, we clone the source data and we replace the loaded asset with
// a clone, this is to prevent modifications to the source data and it gives us some
// flexibility if we need to load the source asset again
AZ::Data::Asset<AZ::Data::AssetData> CloneAssetData(AZ::Data::AssetId newAssetId);