지원 중단 브라우저 상호 작용 코드 교체
Replace any deprecated code with the updated code.
읽는 시간 1분최근 업데이트: 한 달 전
웹 브라우저 스크립트 상호 작용과 관련된 일부 코드의 지원이 중단되어 대체 코드로 교체되었습니다.
코드에 지원 중단된 코드가 포함된 경우, 예기치 않은 동작이나 코드 손상을 방지하기 위해 코드를 대체 코드로 업데이트해야 합니다.
지원 중단 코드 빠른 레퍼런스
다음 코드는 지원이 중단되어 대체 코드로 교체해야 합니다.
지원 중단 코드 | 교체 코드 |
|---|---|
| dynCall() | |
| Pointer_stringify() | |
| unity.Instance() | |
| gameInstance | |
dynCall을 makeDynCall로 변경
dynCalldynCallmakeDynCallWebAssembly.Table예를 들어, 다음을 변경합니다.
dynCall('vii', callback, [1, 2])
변경된 로딩 코드는 다음과 같을 수 있습니다.
{{{ makeDynCall('vii', 'callback') }}}(1, 2)
Pointer_stringify()를 UTF8ToString으로 변경
Pointer_stringify()Pointer_stringify()UTF8ToString()예를 들어, 다음을 변경합니다.
var stringMessage = Pointer_stringify(message);
변경된 로딩 코드는 다음과 같을 수 있습니다.
var stringMessage = UTF8ToString(message);
unity.Instance를 CreateUnityInstance로 변경
unity.Instanceunity.InstanceCreateUnityInstance예를 들어, 다음을 변경합니다.
var MyGameInstance = null; script.onload = () => { unity.Instance(canvas, config, (progress) => { /*...*/ }).then((unityInstance) => {
변경된 로딩 코드는 다음과 같을 수 있습니다.
var MyGameInstance = null; script.onload = () => { createUnityInstance(canvas, config, (progress) => { /*...*/ }).then((unityInstance) => {
gameInstance를 unityInstance로 변경
gameInstancegameInstanceunityInstance예를 들어, 다음을 변경합니다.
MyGameInstance = gameInstance;
변경된 로딩 코드는 다음과 같을 수 있습니다.
MyGameInstance = unityInstance;