Questions et réponses de la communauté

Bienvenue sur le forum de questions et réponses d'Audiokinetic, propulsé par la communauté. C'est l'endroit où les utilisateurs de Wwise et Strata s'entraident. Pour obtenir une aide directe de notre équipe, veuillez utiliser la page « Tickets de soutien ». Pour signaler un bug, utilisez l'option Bug Report dans l'Audiokinetic Launcher. (Veuillez noter que les rapports de bug soumis au forum questions-réponses seront rejetés. L'utilisation de notre système de rapport de bug dédié garantit que votre rapport est vu par les bonnes personnes et a les meilleures chances d'être corrigé.)

Pour obtenir rapidement les meilleures réponses, suivez ces conseils lorsque vous posez une question :

  • Soyez précis : qu'essayez-vous de réaliser ou quel est le problème spécifique que vous rencontrez ?
  • Pensez à inclure les détails importants : incluez des détails tels que les versions de Wwise et du moteur de jeu, le système d'exploitation, etc.
  • Expliquez ce que vous avez essayé de faire : indiquez aux autres les mesures que vous avez déjà prises pour essayer de résoudre le problème.
  • Concentrez-vous sur les faits : décrivez les aspects techniques de votre problème. Se concentrer sur le problème aide les autres personnes à trouver rapidement une solution.

0 votes

Hello! We are having strange bug in our project in Unity (2022.3.20f1) using Wwise 2023.1.4.
Because of maps in game are procedurally generated we are adding prefabs with Multi Position type ambient sources (Ocean and Lakes) through code.
But something went wrong, and every time with new map there's extra sounds are adding in the air, where it shouldn't be (due to top down view it is very noticeable). And this extra source plays both, Lake an Ocean in one place.
Profiler shows nothing weird. One thing I've noticed that attenuation window shows that this extra source is playing always second to last, or last spawned prefabs of Lake and Ocean , although this prefabs are still on their right places in game, when I check them in editor view.
In Wwise I've tried almost everything I could think about - changing to different attenuations, voice behaviours etc. - but with no results.
All prefab settings are checked - its static, multi position is on.
Here's also the parts of code responsible for creating and placing prefab in game.


public GameObject SpawnGO(string holderName, Vector3 position, GameObject goToSpawn, float rotation = 0, bool playAnimation = false, bool castShadows = true, string sendSoundEvent = null, GameObject soundEventGo = null)
    {
        GameObject go;
        go = Instantiate(goToSpawn, GetHolder(holderName));
        go.transform.localPosition = position;
        go.name = goToSpawn.name;            
        go.transform.rotation = Quaternion.Euler(0, rotation, 0);
        if (playAnimation)
            AnimationController.Play(go, WorldAnimationController.EType.Spawn, null, true, sendSoundEvent, soundEventGo);
        if (go.GetComponent<MeshRenderer>() != null)
            go.GetComponent<MeshRenderer>().shadowCastingMode = castShadows ? UnityEngine.Rendering.ShadowCastingMode.TwoSided : UnityEngine.Rendering.ShadowCastingMode.Off;
        else
        {
            var meshes = go.GetComponentsInChildren<MeshRenderer>();
            foreach (var mesh in meshes)
                mesh.shadowCastingMode = castShadows ? UnityEngine.Rendering.ShadowCastingMode.TwoSided : UnityEngine.Rendering.ShadowCastingMode.Off;
        }
        return go;
    }


public void SpawnAmbience()
    {
        List<Vector2Int> shoreTiles = new List<Vector2Int>();
        List<Vector2Int> lakeTiles = new List<Vector2Int>();

        for (int i = 0; i < playData.depthMap.GetLength(0); i++)
        {
            for (int j = 0; j < playData.depthMap.GetLength(1); j++)
            {
                if (playData.depthMap[i, j] == -InfoManager.Instance.oceanDepthForAmbience && playData.GetTile(i, j).terrainType == ETerrainType.Ocean)
                    shoreTiles.Add(new Vector2Int(i, j));
                else if (playData.depthMap[i, j] <= -InfoManager.Instance.minLakeDepthForAmbience && playData.GetTile(i, j).terrainType == ETerrainType.Lake)
                    lakeTiles.Add(new Vector2Int(i, j));
            }
        }
        shoreTiles = FindIntervalPoints(shoreTiles, InfoManager.Instance.oceanAmbienceInterval);
        lakeTiles = FindIntervalPoints(lakeTiles, InfoManager.Instance.lakeAmbienceInterval);
        foreach (var tile in shoreTiles)
            SpawnGO("Ambience", tile.ToWorldPositionXZ(new Vector2(0.5f, 0.5f), 5f), InfoManager.Instance.oceanAmbiencePrefab);
        foreach (var tile in lakeTiles)
            SpawnGO("Ambience", tile.ToWorldPositionXZ(new Vector2(0.5f, 0.5f), 5f), InfoManager.Instance.lakeAmbiencePrefab);

        List<Vector2Int> FindIntervalPoints(List<Vector2Int> allTiles, int distance)
        {
            List<Vector2Int> output = new List<Vector2Int>();
            if (allTiles.Count == 0)
                return output;
            int sqrDistance = (distance * distance);
            while (allTiles.Count > 0)
            {
                var addedTile = allTiles[0];
                output.Add(addedTile);
                allTiles.RemoveAll(x => (x - addedTile).sqrMagnitude <= sqrDistance);
                allTiles.Sort((x, y) => (x - addedTile).sqrMagnitude.CompareTo((y - addedTile).sqrMagnitude));
            }
            return output;
        }
    }


Please, help...)
Where the problem can be?  

dans General Discussion par Serhii T. (100 points)

Please sign-in or register to answer this question.

...