mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
Performance improvement for calculating transform root order
* Related: #1817
This commit is contained in:
parent
b3d503e816
commit
e33d1b9e23
@ -88,8 +88,14 @@ public static class TransformExtensions
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
for (int i = 0; i < father.Children_C4P.Count; i++)
|
||||
for (int i = father.Children_C4.Count - 1; i >= 0; i--)
|
||||
{
|
||||
// Performance optimization: check PathID first to avoid unnecessary asset resolution.
|
||||
if (father.Children_C4[i].PathID != transform.PathID)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (father.Children_C4P[i] == transform)
|
||||
{
|
||||
return i;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user