예제 #1
0
        public static void Check(RESULT result, string error = "Action returned error.", string path = null, FmodSeverity severity = FmodSeverity.Exception)
        {
            if (result == RESULT.OK)
            {
                return;
            }

            string msg = string.Format("FMOD: {0} ({1})",
                                       error,
                                       result);

            if (path != null)
            {
                msg += string.Format("\nEvent path: {0}", path);
            }

            if (severity == FmodSeverity.Exception)
            {
                throw new FmodException(msg);
            }
            else if (severity == FmodSeverity.Error)
            {
                UnityEngine.Debug.LogError(msg);
            }
            else
            {
                UnityEngine.Debug.LogWarning(msg);
            }
        }
예제 #2
0
 void Do(RESULT result, string error, FmodSeverity severity = FmodSeverity.Error)
 {
     FmodUtils.Check(result, error, this.EventPath, severity);
 }