AudioCategory._AnalyseAudioItems C# (CSharp) Method

_AnalyseAudioItems() private method

private _AnalyseAudioItems ( AudioItem>.Dictionary audioItemsDict ) : void
audioItemsDict AudioItem>.Dictionary
return void
    internal void _AnalyseAudioItems( Dictionary<string, AudioItem> audioItemsDict )
    {
        if ( AudioItems == null ) return;

        foreach ( AudioItem ai in AudioItems )
        {
            if ( ai != null )
            {
                ai._Initialize( this );
#if AUDIO_TOOLKIT_DEMO
                int? demoMaxNumAudioItemsConst = 0x12345B;

                int? demoMaxNumAudioItems = (demoMaxNumAudioItemsConst & 0xf);
                demoMaxNumAudioItems++;

                if ( audioItemsDict.Count > demoMaxNumAudioItems )
                {
                    Debug.LogError( "Audio Toolkit: The demo version does not allow more than " + demoMaxNumAudioItems + " audio items." );
                    Debug.LogWarning( "Please buy the full version of Audio Toolkit!" );
                    return;
                }
#endif

                //Debug.Log( string.Format( "SubItem {0}: {1} {2} {3}", fi.Name, ai.FixedOrder, ai.RandomOrderStart, ai._lastChosen ) );

                if ( audioItemsDict != null )
                {
                    try
                    {
                        audioItemsDict.Add( ai.Name, ai );
                    }
                    catch ( ArgumentException )
                    {
                        Debug.LogWarning( "Multiple audio items with name '" + ai.Name + "'");
                    }
                }
            }

        }
    }