Setting 3D Attributes Problem


(Jason Foord) #1

Hey Guys,

First time scripting this function in and can’t figure out the small detail that is stopping it from working.
Error Message: Assets/FMOD Scripts/CentMotorScript.cs(25,84): error CS1525: Unexpected symbol `Attributes’

using UnityEngine;
using System.Collections;

public class CentMotorScript : MonoBehaviour {
	
	
	
	private FMOD.Studio.EventInstance CentipedeMotor; 
	private FMOD.Studio.ParameterInstance CentHealth; 
	private int health;
	private FMOD.Studio.UnityUtil Attributes;


	void Start()
	{
		Attributes = FMOD.Studio.UnityUtil.to3DAttributes (gameObject);
		CentipedeMotor = FMOD_StudioSystem.instance.GetEvent("{fe1b4740-dfbb-450b-8744-9d03d78e20e2}"); 
		CentipedeMotor.getParameter("Health", out CentHealth);
			Debug.Log ("Start Event");
			CentipedeMotor.start();
	}
	
	void Update ()
	{
		CentipedeMotor.set3DAttributes(FMOD.Studio._3D_ATTRIBUTES Attributes);
		health = GetComponent<Health> ().currentHealth;
		Debug.Log (health);
		CentHealth.setValue (health);
	}

	void OnDisable ()
	{
		CentipedeMotor.stop (FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
		CentipedeMotor.release ();
	}

}

(Steve Tack) #2

I assume you’d want:
CentipedeMotor.set3DAttributes(Attributes);

rather than:
CentipedeMotor.set3DAttributes(FMOD.Studio._3D_ATTRIBUTES Attributes);