static public bool ValidatePreviewSceneObjectState(GameObject root) { m_Errors.Clear(); TransformVisitor visitor = new TransformVisitor(); visitor.VisitAll(root.transform, ValidateGameObject, null); return(m_Errors.Count == 0); }
public FileIDToInstanceIDMapper(Transform searchRoot, List <UInt64> fileIDs, UInt64 fileID) { m_FileIDs = fileIDs; m_FileID = fileID; var transformVisitor = new TransformVisitor(); transformVisitor.VisitAll(searchRoot, AddGameObjectIfMatching, null); }
static Scene LoadOrCreatePreviewScene(string environmentEditingScenePath) { Scene previewScene; if (!string.IsNullOrEmpty(environmentEditingScenePath)) { previewScene = EditorSceneManager.OpenPreviewScene(environmentEditingScenePath); var roots = previewScene.GetRootGameObjects(); var visitor = new TransformVisitor(); foreach (var root in roots) { visitor.VisitAll(root.transform, AppendEnvironmentName, null); } } else { previewScene = CreateDefaultPreviewScene(); } return(previewScene); }