From 41ebad422db2c8a0eac52d601274bee898a3b883 Mon Sep 17 00:00:00 2001 From: Minshu Gurjar Date: Thu, 5 Jan 2023 18:19:42 +0530 Subject: [PATCH] fix missing meshes (umap) --- FModel/Views/Snooper/Renderer.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/FModel/Views/Snooper/Renderer.cs b/FModel/Views/Snooper/Renderer.cs index d0123da8..86b8d51c 100644 --- a/FModel/Views/Snooper/Renderer.cs +++ b/FModel/Views/Snooper/Renderer.cs @@ -262,9 +262,18 @@ public class Renderer : IDisposable staticMeshComponent.Load() is not { } staticMeshComp) return; if (!staticMeshComp.TryGetValue(out FPackageIndex staticMesh, "StaticMesh") && actor.Class is UBlueprintGeneratedClass) + { foreach (var actorExp in actor.Class.Owner.GetExports()) if (actorExp.TryGetValue(out staticMesh, "StaticMesh")) break; + var super = actor.Class.SuperStruct.Load(); + if (staticMesh == null && super != null) { // look in parent struct if not found + foreach (var actorExp in super.Owner.GetExports()) { + if (actorExp.TryGetValue(out staticMesh, "StaticMesh")) + break; + } + } + } if (staticMesh?.Load() is not UStaticMesh m || m.Materials.Length < 1) return;