버전
menu

경고: 보호된 일부 정보는 표시되지 않습니다.
특정 플랫폼에 대한 라이센스가 있는 사용자인 경우 로그인하세요.

Game Engine Integration

This section includes additional instructions for certain game engine integration scenarios.

Copying libraries for the Unity Integration

In addition to the speechEngine plug-in library, voices dynamic libraries are required at runtime such as vt_eng.dll or vt_fre.dll for English and French on Windows.

To copy the required libraries during the build phase, use the Unity Editor helper script located in the following directory in the Unity project: SDK/Plugins/speechEngine/Unity/Editor/SpeechEnginePluginImporterScript.cs

Converting character encoding to UTF-8

Any text you send at runtime must use UTF-8 character encoding. Depending on the platform, you might have to convert text from a different type of encoding to UTF-8. The following code samples for Unity and Unreal demonstrate how to convert UTF-16 encoding (the default on Windows) to UTF-8. You might have to modify the code for other platforms depending on the type of encoding they use.

Unity:

public byte[] ConvertUtf16ToUtf8Bytes(string utf16String)
{
	// Get the UTF-8 encoding
	Encoding utf8 = Encoding.UTF8;

	// Convert the UTF-16 string to a UTF-8 byte array
	byte[] utf8Bytes = utf8.GetBytes(utf16String);

	return utf8Bytes;
}

byte[] textArray = ConvertUtf16ToUtf8Bytes(Text);
System.Runtime.InteropServices.GCHandle pinned = System.Runtime.InteropServices.GCHandle.Alloc(textArray, System.Runtime.InteropServices.GCHandleType.Pinned);
IntPtr address = pinned.AddrOfPinnedObject();
AkUnitySoundEngine.SendPluginCustomGameData(0, this.gameObject, AkPluginType.AkPluginTypeSource, 312, 1, address, (uint)textArray.Length);
pinned.Free();
				

Unreal:

FString utf16_text = "This is a UTF-16 string at its core.";
FStringView fStringView(utf16_text);
auto ConvertedTemp = StringCast<UTF8CHAR>(fStringView.GetData(), fStringView.Len());
auto utf8_text = ConvertedTemp.Get();
SoundEngine->SendPluginCustomGameData(0, 100, AkPluginTypeSource, 312, 1, utf8_text, ConvertedTemp.Length() + 1);
				

SoundBank Generation on Mac

The speechEngine plug-in does not support the Mac platform. However, if you generate SoundBanks through the Wwise Unreal or Unity Integration, SoundBanks are automatically generated for Mac, which can cause errors. Therefore, we recommend that you explicitly exclude all speechEngine elements from your Wwise project for Mac to avoid such errors. See Excluding project elements from a platform for more information.

Compiling the speechEngine IntegrationDemo page for iOS

To compile the speechEngine plug-in page of the IntegrationDemo, you need to modify the Xcode project included with the Wwise SDK.

In the IntegrationDemo Xcode properties:

  • Under General - Frameworks, Libraries and Embedded Content:

    • Add all the vt_[lang]_q22.framework files found under Applications/Audiokinetic/Wwise[version]/SDK/iOS_Xcode[version]/[configuration]/bin.

  • Under Build Settings:

    • Add @executable_path/Frameworks to Runpath Search Paths.

    • Add ../../../iOS_Xcode$(XCODE_VERSION_MAJOR)/Profile$(EFFECTIVE_PLATFORM_NAME)/bin to Framework Search Paths.


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

지원이 필요하신가요?

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

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

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

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

Wwise를 시작해 보세요