Beispiel #1
0
        /*! \endcond */

        /// <summary>
        /// Gets the bus volume (used by Master Audio prefab during Awake event to set persistent levels).
        /// </summary>
        /// <returns>The group volume.</returns>
        /// <param name="busName">Group name.</param>
        public static float?GetBusVolume(string busName)
        {
            var busKey = MakeBusKey(busName);

            if (!PlayerPrefs.HasKey(busKey))
            {
                return(null);
            }

            return(PlayerPrefs.GetFloat(busKey));
        }
Beispiel #2
0
        /// <summary>
        /// Gets the group volume (used by Master Audio prefab during Awake event to set persistent levels).
        /// </summary>
        /// <returns>The group volume.</returns>
        /// <param name="grpName">Group name.</param>
        public static float?GetGroupVolume(string grpName)
        {
            var groupKey = GetGroupKey(grpName);

            if (!PlayerPrefs.HasKey(groupKey))
            {
                return(null);
            }

            return(PlayerPrefs.GetFloat(groupKey));
        }