private void SceneVisitorOptionToggle(string name, SceneVisitor.Options option)
        {
            bool toggle = SceneVisitor.IsSet(mSceneVisitorOptions, option);

            toggle = GUILayout.Toggle(toggle, name, EditorStyles.toolbarButton, GUILayout.ExpandWidth(false));
            if (toggle)
            {
                mSceneVisitorOptions |= option;
            }
            else
            {
                mSceneVisitorOptions &= ~option;
            }
        }
        public string DumpToString(IEnumerable objects, SceneVisitor.Options options)
        {
            string results = null;

            using (StringWriter stringWriter = new StringWriter())
            {
                mWriter = stringWriter;
                Traverse(objects, options);
                results = mWriter.ToString();
            }

            mWriter = null;

            return(results);
        }
        public void DumpToFile(IEnumerable objects, SceneVisitor.Options options, string filename)
        {
            // Make sure we have a filename to output to.
            if (String.IsNullOrEmpty(filename))
            {
                filename = cDefaultOutputFile;
            }

            // If no folder specified then output to the Assets folder.
            if (!Path.IsPathRooted(filename))
            {
                filename = Path.Combine(Application.dataPath, filename);
            }

            // Normalize slashes in path.
            filename = filename.Replace(@"\", @"/");

            using (mWriter = new StreamWriter(filename))
            {
                Traverse(objects, options);
            }
            mWriter = null;
        }
 private void SceneVisitorOptionToggle(string name, SceneVisitor.Options option)
 {
     bool toggle = SceneVisitor.IsSet(mSceneVisitorOptions, option);
     toggle = GUILayout.Toggle(toggle, name, EditorStyles.toolbarButton, GUILayout.ExpandWidth(false));
     if (toggle)
     {
         mSceneVisitorOptions |= option;
     }
     else
     {
         mSceneVisitorOptions &= ~option;
     }
 }