示例#1
0
        void Start()
        {
            // Create
            RESULT result = RESULT.OK;

            result = RuntimeManager.LowlevelSystem.createReverb3D(out reverb);

            if (result != RESULT.OK)
            {
                UnityEngine.Debug.LogWarning("FMOD Extensions: Could not create 3D Reverb. " + result);
                return;
            }

            // Get the reverb's properties (preset and position)
            properties = ExtensionsUtils.ExtensionReverbToFMODReverb(preset);
            reverb.setProperties(ref properties);
            VECTOR pos = RuntimeUtils.ToFMODVector(transform.position);

            // Set position, min and max distances
            result = reverb.set3DAttributes(ref pos, minDistance, maxDistance);

            if (result != RESULT.OK)
            {
                UnityEngine.Debug.LogError("FMOD Extensions: Could not set 3D attributes to the 3D reverb " + result, this);
                return;
            }

            UnityEngine.Debug.Log("FMOD Extensions: Created 3D Reverb");
        }
示例#2
0
        public RESULT Set3DAttributes(ref VECTOR pos, float MinDist, float MaxDist)
        {
            this.Collision.X = pos.x;
            Collision.Y      = pos.y;
            Z           = pos.z;
            MaxDistance = MaxDist;
            MinDistance = MinDist;
            RESULT r = reverb.set3DAttributes(ref pos, MinDist, MaxDist);

            return(r);
        }