private void ProcessGameObject(AssetDocumentHierarchyElement owner, IGameObjectHierarchy gameObject, IGameObjectConsumer consumer, bool prefabImport, HashSet <ulong> visited) { var transform = gameObject?.GetTransformHierarchy(owner); if (transform == null) { return; } if (!consumer.AddGameObject(owner, gameObject)) { return; } var parentTransform = myAssetDocumentHierarchyElementContainer.GetHierarchyElement(transform.ParentTransform, prefabImport) as ITransformHierarchy; if (parentTransform == null) { return; } visited.Add(gameObject.Location.LocalDocumentAnchor); ProcessHierarchy(owner, parentTransform, consumer, prefabImport, visited); }
public ImportedGameObjectHierarchy(IPrefabInstanceHierarchy prefabInstanceHierarchy, IGameObjectHierarchy gameObjectHierarchy) { myPrefabInstanceHierarchy = prefabInstanceHierarchy; myGameObjectHierarchy = gameObjectHierarchy; }
public bool AddGameObject(AssetDocumentHierarchyElement owner, IGameObjectHierarchy gameObject) { myParts.Push(gameObject.Name ?? "..."); myIndex.Push(gameObject.GetTransformHierarchy(owner).NotNull("gameObject.GetTransformHierarchy(cache, owner) != null").RootIndex); return(!myOnlyName); }