diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-09 20:34:08 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-09 20:34:08 -0700 |
| commit | a72d2119865983bb017f91f6c3bf4a4e0a9a0256 (patch) | |
| tree | 46477cedde9787d93f580d748b50a5b18f53c3ea /Scripts/YOTSNDMFGenerator.cs | |
| parent | 161ccbaa357cacbaaf5d2ab715250bd69f3fc202 (diff) | |
Name resolution now only works for gameobjects with a meshrenderer or skinned mesh rendererHEADmaster
Diffstat (limited to 'Scripts/YOTSNDMFGenerator.cs')
| -rw-r--r-- | Scripts/YOTSNDMFGenerator.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Scripts/YOTSNDMFGenerator.cs b/Scripts/YOTSNDMFGenerator.cs index 9af0772..6cb1e21 100644 --- a/Scripts/YOTSNDMFGenerator.cs +++ b/Scripts/YOTSNDMFGenerator.cs @@ -254,9 +254,11 @@ namespace YOTS private static void CollectPaths(Transform current, string currentPath, Dictionary<string, List<string>> map) {
foreach (Transform child in current) {
string childPath = currentPath == "" ? child.name : currentPath + "/" + child.name;
- if (!map.ContainsKey(child.name))
- map[child.name] = new List<string>();
- map[child.name].Add(childPath);
+ if (child.GetComponent<SkinnedMeshRenderer>() != null || child.GetComponent<MeshRenderer>() != null) {
+ if (!map.ContainsKey(child.name))
+ map[child.name] = new List<string>();
+ map[child.name].Add(childPath);
+ }
CollectPaths(child, childPath, map);
}
}
|
