hello everybody, i can´t call a parameter , what´s wrong??
i´m using FMOD Studio 1.07 and FMOD Studio Integration 2.0 Package Version 1.07.03 and unity 5.2
Code Summary:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class PlayerController : MonoBehaviour {
private float pvel; // Unity event for wall impacts
private FMOD.Studio.EventInstance wallHit; // parameter in FMOD "wall-hit-vel" event
private FMOD.Studio.ParameterInstance parameter_name; // fmod parameter
void FixedUpdate ()
pvel = gameObject.GetComponent<Rigidbody>().velocity.magnitude;
void OnTriggerEnter(Collider other) {
if (other.gameObject.CompareTag ("wall")) {
FMODUnity.RuntimeManager.PlayOneShot("event:/wall");
wall = FMODUnity.RuntimeManager.CreateInstance("event:/parameter_name");
if (wall.getParameter ("parameter_name", out parameter_name) != FMOD.RESULT.OK) {
Debug.LogError ("parameter bad");
return;
}
parameter_name.setValue(pvel);
wall.start();
}
thankyuo very much.