/// <summary> /// Updates the 3D attributes. /// </summary> private void Update3DAttributes() { if (evt != null && evt.IsValid()) { FMOD3DAttributes attributes = UnityUtil.To3DAttributes(gameObject, cachedRigidBody); Logger.ErrorCheck(evt.Set3DAttributes(attributes)); } }
/// <summary> /// Update3s the d attributes. /// </summary> private void Update3DAttributes() { //FMOD.Studio.System studioSystem = FMODStudioSystem.Instance.System; //if (studioSystem.System != null && studioSystem.System.IsValid()) { FMOD3DAttributes attributes = UnityUtil.To3DAttributes(gameObject, cachedRigidBody); Logger.ErrorCheck(studioSystem.System.SetListenerAttributes(attributes)); //} }
/// <summary> /// Plays the one shot. /// </summary> /// <param name="path">The path.</param> /// <param name="position">The position.</param> /// <param name="volume">The volume.</param> private void PlayOneShot(string path, Vector3 position, float volume) { EventInstance instance = GetEvent(path); FMOD3DAttributes attributes = UnityUtil.To3DAttributes(position); Logger.ErrorCheck(instance.Set3DAttributes(attributes)); Logger.ErrorCheck(instance.SetVolume(volume)); Logger.ErrorCheck(instance.Start()); Logger.ErrorCheck(instance.Release()); }