Audiokinetic의 커뮤니티 Q&A는 사용자가 Wwise와 Strata 커뮤니티 내에서 서로 질문과 답변을 하는 포럼입니다. Audiokinetic의 기술 지원팀에게 문의하고 싶으신 경우 지원 티켓 페이지를 사용해주세요.

+1 투표

This is a question posted on social media and continued here to benefit those not on social media. 

Here's a suggestion for a script that detects what sounds are entering the AkEnvironment's trigger. 


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CheckTriggerInteractions : MonoBehaviour
{
     private void OnTriggerEnter(Collider other)
     {

          if (other.GetComponent<AkGameObj>() != null) {
               print(other.gameObject.name+" entered "+gameObject.name+"'s trigger.");
          }
     }

     private void OnTriggerExit(Collider other)
     {

          if (other.GetComponent<AkGameObj>() != null)
          {

               print(other.gameObject.name + " exited " + gameObject.name + "'s trigger.");
          }
     }
}


Should be copied and pasted into a new script on the AkEnvironment game object.

General Discussion Mads Maretty S. (Audiokinetic) (40.2k 포인트) 로 부터
수정 Mads Maretty S. (Audiokinetic) 로 부터

Please sign-in or register to answer this question.

...