Skip to content

Commit

Permalink
prevent FindAllInstances from finding PropertyType
Browse files Browse the repository at this point in the history
  • Loading branch information
atenfyr committed Oct 20, 2021
1 parent 163f31c commit e756426
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions UAssetAPI/FFieldPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public struct FFieldPath
/// Path to the FField object from the innermost FField to the outermost UObject (UPackage)
/// </summary>
public FName[] Path;

/// <summary>
/// The cached owner of this field.
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions UAssetAPI/UAPUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UAssetAPI.PropertyTypes;

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

Expand Down

0 comments on commit e756426

Please sign in to comment.