버전

menu_open
Wwise SDK 2021.1.14
Python (Waapi-Client) - 원격 프로시저 호출

프로젝트 초기화하기

참고: Python Waapi-Client는 Python 3.6+로 사용하게 돼있습니다.

어느 디렉터리에서든 상관 없이 다음 명령을 실행해 종속성을 설치하세요.

py -3 -m pip install waapi-client

프로젝트 코드

이 파일에는 다음 코드가 포함돼있어 Wwise Authoring API에 연결할 수 있게 해줍니다.

#!/usr/bin/env python3
from waapi import WaapiClient, CannotConnectToWaapiException
from pprint import pprint
try:
# Connecting to Waapi using default URL
with WaapiClient() as client:
# NOTE: client will automatically disconnect at the end of the scope
# == Simple RPC without argument
print("Getting Wwise instance information:")
result = client.call("ak.wwise.core.getInfo")
pprint(result)
# == RPC with arguments
print("Query the Default Work Unit information:")
object_get_args = {
"from": {
"path": ["\\Actor-Mixer Hierarchy\\Default Work Unit"]
},
"options": {
"return": ["id", "name", "type"]
}
}
result = client.call("ak.wwise.core.object.get", object_get_args)
pprint(result)
except CannotConnectToWaapiException:
print("Could not connect to Waapi: Is Wwise running and Wwise Authoring API enabled?")

프로젝트 실행하기

Wwise에서 프로젝트를 열어놓은 상태에서, 터미널에서 다음 명령으로 스크립트를 실행합니다.

py rpc.py

다음과 같은 출력물이 뜨게 됩니다.

Getting Wwise instance information:
[Wwise Information Dictionary dump]
Query the Default Work Unit information:
{'return': [{'id': '{CDF62889-48AA-436C-B7DD-5B6B1DF5050D}',
'name': 'Default Work Unit',
'type': 'WorkUnit'}]}

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요