Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

How to make multi player games audio in unity

0 votes
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.
asked Dec 17, 2021 in General Discussion by 拓哉 (100 points)

Please sign-in or register to answer this question.

...