예제 #1
0
파일: Preview.cs 프로젝트: xcxcmath/HoloDVR
 public static void TogglePreview()
 {
     // try to load from manual settings if available
     if (manualPreviewSettings == null)
     {
         manualPreviewSettings = AssetDatabase.LoadAssetAtPath <ManualPreviewSettings>(manualSettingsPath);
     }
     // handle the preview
     HandlePreview(true);
 }
예제 #2
0
파일: Preview.cs 프로젝트: xcxcmath/HoloDVR
        static void CreateManualPreviewAsset()
        {
            ManualPreviewSettings previewSettings = AssetDatabase.LoadAssetAtPath <ManualPreviewSettings>(manualSettingsPath);

            if (previewSettings == null)
            {
                previewSettings = ScriptableObject.CreateInstance <ManualPreviewSettings>();
                AssetDatabase.CreateAsset(previewSettings, manualSettingsPath);
                AssetDatabase.SaveAssets();
            }
            EditorUtility.FocusProjectWindow();
            Selection.activeObject = previewSettings;
        }