11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT License. See LICENSE in the project root for license information.
33
4+ using System ;
45using System . Collections ;
56using System . Collections . Generic ;
67using UnityEngine ;
8+ using Random = UnityEngine . Random ;
79
810namespace HoloToolkit . Unity
911{
1012 /// <summary>
1113 /// UAudioManagerBase provides the base functionality for UAudioManager classes.
1214 /// </summary>
1315 /// <typeparam name="TEvent">The type of AudioEvent being managed.</typeparam>
16+ /// <typeparam name="TBank"></typeparam>
1417 /// <remarks>The TEvent type specified must derive from AudioEvent.</remarks>
1518 public partial class UAudioManagerBase < TEvent , TBank > : MonoBehaviour where TEvent : AudioEvent , new ( ) where TBank : AudioBank < TEvent > , new ( )
1619 {
1720 public TBank [ ] DefaultBanks = null ;
1821
1922 [ SerializeField ]
20- [ System . Obsolete ]
23+ [ Obsolete ]
2124 protected TEvent [ ] Events = null ;
2225
2326 protected const float InfiniteLoop = - 1 ;
2427 protected List < ActiveEvent > ActiveEvents ;
2528
2629#if UNITY_EDITOR
30+ // Temp disable this obsolete warning until we remove Events field.
31+ // This public editor only field is here for enabling users to export audio events
32+ // into banks for the new paradigm.
33+ #pragma warning disable 612
2734 public TEvent [ ] EditorEvents { get { return Events ; } set { Events = value ; } }
35+ #pragma warning restore 612
2836 public List < ActiveEvent > ProfilerEvents { get { return ActiveEvents ; } }
2937#endif
3038
@@ -34,7 +42,7 @@ protected void Awake()
3442 {
3543 ActiveEvents = new List < ActiveEvent > ( ) ;
3644 LoadedBanks = new List < TBank > ( DefaultBanks . Length + 5 ) ;
37- for ( int i = 0 ; i < DefaultBanks . Length ; i ++ )
45+ for ( int i = 0 ; i < DefaultBanks . Length ; i ++ )
3846 {
3947 LoadBank ( DefaultBanks [ i ] ) ;
4048 }
0 commit comments