File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,22 @@ var NativeLib = {
1111 NullPtr : 0 ,
1212
1313 DynCall : function ( sig , fnc , args ) {
14- if ( typeof Runtime !== 'undefined' ) {
15- Runtime . dynCall ( sig , fnc , args ) ; // Old Unity version
16- } else {
17- dynCall ( sig , fnc , args ) ;
14+ if ( typeof Runtime !== 'undefined' && typeof Runtime . dynCall === 'function' ) {
15+ return Runtime . dynCall ( sig , fnc , args ) ;
16+ }
17+
18+ if ( sig === 'vi' ) {
19+ return ( { { { makeDynCall ( 'vi' , 'fnc' ) } } } ) . apply ( null , args ) ;
20+ }
21+
22+ var legacy = ( typeof Module !== 'undefined' ) ? Module [ 'dynCall_' + sig ] : undefined ;
23+ if ( typeof legacy === 'function' ) {
24+ return legacy . apply ( null , [ fnc ] . concat ( args ) ) ;
25+ }
26+
27+ var table = ( typeof Module !== 'undefined' && Module [ 'wasmTable' ] ) ? Module [ 'wasmTable' ] : ( typeof wasmTable !== 'undefined' ? wasmTable : undefined ) ;
28+ if ( table && typeof table . get === 'function' ) {
29+ return table . get ( fnc ) . apply ( null , args ) ;
1830 }
1931 } ,
2032
You can’t perform that action at this time.
0 commit comments