Hello.
I am making a game in which four people play against each other at the same time.
There are objects that make sounds in the space, and the player can move around the space freely.
I want to output the sound that can be heard at each player's location to each player's headphones in stereophonic sound, but I can't.
My guess is AkSoundEngine.SetActiveListeners ();
I think it is possible to link the headphone with the object that becomes the listener by using, but error CS0117: ‘SetActiveLisners’ does not contain a definition for ‘AkSoundEngine’ error occurs.
This is the program.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ListnerControl: MonoBehaviour
{
// Start is called before the first frame update
public void Start ()
{
string nameOfDevice = "Headphone_Name)";
// Get ID of it
uint IDofDevice = AkSoundEngine.GetDeviceIDFromName (nameOfDevice);
// Create new Output Setting
AkOutputSettings newOutput = new AkOutputSettings ("Speaker", ID ofDevice);
// Add the Output
AkSoundEngine.AddOutput (newOutput);
AkSoundEngine.SetActiveListeners ();
}
// Update is called once per frame
void Update ()
{
}
}
Please Help me.
I am Japanese. This text uses Google Translate. Please forgive me for the inconvenient English.