internal void ResolveComponentInstanceIds(int gameObjectInstanceId, List <Component> components) { NativeList <int> dependentList = new NativeList <int>(32, Allocator.Temp); foreach (var c in components) { int componentInstanceId = c.GetInstanceID(); if (!_unresolvedComponentInstanceIds.Remove(componentInstanceId)) { continue; } GameObjectDependencyTracker.RemapInstanceId(componentInstanceId, gameObjectInstanceId); var typeIndex = TypeManager.GetTypeIndex(c.GetType()); if (_componentDependenciesByTypeIndex.TryGetValue(typeIndex, out var dependencyTracker)) { dependencyTracker.RemapInstanceId(componentInstanceId, gameObjectInstanceId); } dependentList.Clear(); } }