void OnEnable()
        {
            ftmObject = (GameObject)Selection.activeObject;
            ftm       = ftmObject.GetComponent <FlyThroughManager>();
            ft        = ftm.flyThrough;

            if (ft.nodes == null)
            {
                ft.nodes = new List <BaseNode>();
            }
            if (ft.startEndNodes == null)
            {
                ft.startEndNodes = new List <StartEndNode>();
            }
            if (ft.pathNodes == null)
            {
                ft.pathNodes = new List <PathNode>();
            }

            nodeList      = ft.nodes;
            startEndNodes = ft.startEndNodes;
            pathNodes     = ft.pathNodes;

            DefineStyles();
        }
 static bool InitValidator()
 {
     try
     {
         FlyThrough ft = (FlyThrough)Selection.activeObject;
         return(true);
     }
     catch { return(false); }
 }
        public static FlyThrough Create()
        {
            FlyThrough asset = ScriptableObject.CreateInstance <FlyThrough>();

            string assetPathAndName = AssetDatabase.GenerateUniqueAssetPath(GetPath() + "/New Fly-Through Controller.asset");

            AssetDatabase.CreateAsset(asset, assetPathAndName);
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
            EditorUtility.FocusProjectWindow();
            Selection.activeObject = asset;

            return(asset);
        }