Skip to content

Commit 000f8b3

Browse files
committed
Update to version 1.4.4. Support has been added for scanning Primary Data Assets contained within a TMap data type during recursion.
1 parent 3b52998 commit 000f8b3

3 files changed

Lines changed: 49 additions & 6 deletions

File tree

Plugins/AsyncDataAssetManager/AsyncDataAssetManager.uplugin

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
33
"Version": 1,
4-
"VersionName": "1.4.3",
4+
"VersionName": "1.4.4",
55
"FriendlyName": "Async Data Asset Manager",
66
"Description": "Asynchronous management of data assets.",
77
"Category": "Async Technologies",
@@ -10,7 +10,7 @@
1010
"DocsURL": "https://github.com/Pavreally/AsyncDataAssetManager",
1111
"MarketplaceURL": "",
1212
"SupportURL": "",
13-
"EngineVersion": "5.6.0",
13+
"EngineVersion": "5.7.0",
1414
"CanContainContent": true,
1515
"IsBetaVersion": false,
1616
"Installed": true,

Plugins/AsyncDataAssetManager/Source/AsyncDataAssetManager/Private/ADAMS_Getters.cpp

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,45 @@ void UAsyncDataAssetManagerSubsystem::FindNestedAssetsRecursive(void* Container,
177177
}
178178
}
179179
}
180+
// Handle map properties (TMap)
181+
else if (const FMapProperty* MapProp = CastField<FMapProperty>(Prop))
182+
{
183+
FScriptMapHelper MapHelper(MapProp, MapProp->ContainerPtrToValuePtr<void>(Container));
184+
185+
const FProperty* KeyProp = MapProp->KeyProp;
186+
const FProperty* ValueProp = MapProp->ValueProp;
187+
188+
for (int32 i = 0; i < MapHelper.GetMaxIndex(); ++i)
189+
{
190+
if (!MapHelper.IsValidIndex(i))
191+
continue;
192+
193+
void* ValuePtr = MapHelper.GetValuePtr(i);
194+
195+
// Value (TSoftObjectPtr<UPrimaryDataAsset>)
196+
if (const FSoftObjectProperty* ValueSoftObjectProperty = CastField<FSoftObjectProperty>(ValueProp))
197+
{
198+
if (ValueSoftObjectProperty->PropertyClass->IsChildOf(UPrimaryDataAsset::StaticClass()))
199+
{
200+
TSoftObjectPtr<UPrimaryDataAsset> ChildAsset = *reinterpret_cast<TSoftObjectPtr<UPrimaryDataAsset>*>(ValuePtr);
201+
FString ChildAssetName = ChildAsset.GetAssetName();
202+
if (!ChildAssetName.IsEmpty() && !UniqueAssetNames.Contains(ChildAssetName))
203+
{
204+
UniqueAssetNames.Add(ChildAssetName);
205+
OutNestedAssets.Add(ChildAsset);
206+
}
207+
}
208+
}
209+
// Value: struct (recurse)
210+
else if (const FStructProperty* ValueStructProperty = CastField<FStructProperty>(ValueProp))
211+
{
212+
if (ValuePtr)
213+
{
214+
FindNestedAssetsRecursive(ValuePtr, ValueStructProperty->Struct, OutNestedAssets, UniqueAssetNames);
215+
}
216+
}
217+
}
218+
}
180219
}
181220
}
182221

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ ADAM is a plugin for Unreal Engine 5 that adds a subsystem for asynchronous load
99
> The plugin has been pre-packaged only for Win64 and Android.
1010
1111
## Latest Updates
12-
`Version 1.4.3`
13-
- Build version for Unreal Engine 5.6.0+
14-
- Improved recursive loading option. The function parameters of `LoadADAM` and `LoadArrayADAM` have been updated. Added the ability to specify the recursion depth, allowing data to be loaded only up to a defined level of nesting.
15-
- `New` Added a new function `GetDataByClassADAM`. This function retrieves a filtered list of loaded data assets from ADAM’s internal memory based on class and tag. (For example, this can be useful when working with deeply nested assets required for data retrieval.)
12+
`Version 1.4.4`
13+
- Build version for Unreal Engine 5.7.0+
14+
- Support has been added for scanning Primary Data Assets contained within a TMap data type during recursion.
15+
1616

1717
## What it's for
1818
- Load and unload Data Assets asynchronously using simple functions.
@@ -30,6 +30,10 @@ ADAM is a plugin for Unreal Engine 5 that adds a subsystem for asynchronous load
3030
- Disableable debug logs allow you to monitor the entire asynchronous data management process. Plugin settings are located in `Project Settings > Plugins > Async Technologies - ADAM`.
3131

3232
## Install
33+
34+
> [!NOTE]
35+
> Starting with Unreal Engine version 5.6, it is recommended to use the new project type based on C++. After copying the plugin folder, be sure to perform a full project rebuild in your C++ IDE.
36+
3337
1. Make sure the Unreal Engine editor is closed.
3438
2. Move the "Plugins" folder to the root folder of your created project.
3539
3. Run your project to which the "Plugins" folder with 'AsyncDataAssetManager' was added. If a message about restoring the module appears, select "Yes".

0 commit comments

Comments
 (0)