Skip to content

Commit e756426

Browse files
committed
prevent FindAllInstances from finding PropertyType
1 parent 163f31c commit e756426

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

UAssetAPI/FFieldPath.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public struct FFieldPath
66
/// Path to the FField object from the innermost FField to the outermost UObject (UPackage)
77
/// </summary>
88
public FName[] Path;
9+
910
/// <summary>
1011
/// The cached owner of this field.
1112
/// </summary>

UAssetAPI/UAPUtils.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections;
33
using System.Collections.Generic;
44
using System.Reflection;
5+
using UAssetAPI.PropertyTypes;
56

67
namespace UAssetAPI
78
{
@@ -41,6 +42,7 @@ private static void FindAllInstances<T>(object value, HashSet<object> yaExplorad
4142
foreach (PropertyInfo property in properties)
4243
{
4344
if (property.GetIndexParameters().Length > 0) continue;
45+
if (value is PropertyData && (property.Name == "PropertyType" || property.Name == "HasCustomStructSerialization")) continue;
4446
FindAllInstances<T>(property.GetValue(value, null), yaExplorado, res);
4547
}
4648

0 commit comments

Comments
 (0)