Пример #1
0
        public static void RemoveExampleSpecificData()
        {
            if (_instance == null)
            {
                _instance = new SetupMediaPlayerExample();
            }

            EditorUtility.DisplayProgressBar("Cleaning Example Project", "Deleting example video streaming assets", 0.25f);
            if (!_instance.RemoveVideoExampleStreamingAssets())
            {
                UnityEngine.Debug.Log("Failed to delete example video streaming assets.");
                EditorUtility.ClearProgressBar();
                return;
            }

            EditorUtility.DisplayProgressBar("Cleaning Example Project", "Refreshing Asset Database", 1.0f);

            AssetDatabase.Refresh();

            UnityEngine.Debug.Log("Successfully cleaned example video streaming data from project.");
            EditorUtility.ClearProgressBar();
        }
Пример #2
0
        public static void AddMediaPlayerExampleData()
        {
            if (_instance == null)
            {
                _instance = new SetupMediaPlayerExample();
            }

            _instance._stereoVideoExampleAssetPath = Path.Combine(Application.dataPath, Path.Combine("MagicLeap", "Examples", "Streaming", Path.Combine("MediaPlayer", "StreamingAssets")));

            EditorUtility.DisplayProgressBar("Setting up Media Player Example", "Copying example video streaming assets", 0.25f);
            if (!_instance.CopyMediaPlayerExampleStreamingAssets())
            {
                UnityEngine.Debug.Log("Failed to copy example video streaming assets.");
                EditorUtility.ClearProgressBar();
                return;
            }

            EditorUtility.DisplayProgressBar("Setting up Media Player Example", "Refreshing Asset Database", 1.0f);

            AssetDatabase.Refresh();

            UnityEngine.Debug.Log("Successfully setup project for Media Player Example.");
            EditorUtility.ClearProgressBar();
        }