/// <summary> /// Determines whether or not the provided extension is present in any of the categories registered in this class. /// </summary> /// <returns><c>true</c> if the extension is unknown; otherwise, <c>false</c>.</returns> /// <param name="extension">Extension.</param> public static bool IsExtensionUnknown(string extension) { return(ModelTypeExtensions.Contains(extension) || TextureTypeExtensions.Contains(extension) || AudioTypeExtensions.Contains(extension) || DataTypeExtensions.Contains(extension) || TerrainTypeExtensions.Contains(extension)); }
public async UniTask Load() { if (loaded) { Unload(); } var type = AudioTypeExtensions.Detect(Path); // TODO: Load remote mp3 with non-mobile platform (Download with UnityWebRequest first?) // Load .mp3 with NLayer on non-mobile platforms if ( Path.StartsWith("file://") && type == AudioType.MPEG && Application.platform != RuntimePlatform.Android && Application.platform != RuntimePlatform.IPhonePlayer ) { nLayerLoader = new NLayerLoader(Path); AudioClip = nLayerLoader.LoadAudioClip(); } else { using (var request = UnityWebRequestMultimedia.GetAudioClip(Path, type)) { await request.SendWebRequest(); if (request.isNetworkError || request.isHttpError) { Error = request.error; return; } AudioClip = DownloadHandlerAudioClip.GetContent(request); } } loaded = true; }