File tree Expand file tree Collapse file tree
Assets/AndroidIl2cppPatchDemo
Plugins/Android/java/io/github/noodle1983 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,10 +189,7 @@ public static bool PatchAndroidProject()
189189import io.github.noodle1983.Boostrap;" ) ;
190190
191191 allJavaText = allJavaText . Replace ( "mUnityPlayer = new UnityPlayer(this);" ,
192- @"System.loadLibrary(""main"");
193- System.loadLibrary(""unity"");
194- System.loadLibrary(""bootstrap"");
195- Boostrap.init(getApplication().getApplicationContext().getFilesDir().getPath());
192+ @"Boostrap.InitNativeLibBeforeUnityPlay(getApplication().getApplicationContext().getFilesDir().getPath());
196193 mUnityPlayer = new UnityPlayer(this);" ) ;
197194 File . WriteAllText ( javaEntranceFile , allJavaText ) ;
198195 return true ;
Original file line number Diff line number Diff line change 33public class Boostrap
44{
55 public static native void init (String filePath );
6+
7+ public static void InitNativeLibBeforeUnityPlay (String filePath )
8+ {
9+ System .loadLibrary ("main" );
10+ System .loadLibrary ("unity" );
11+ System .loadLibrary ("bootstrap" );
12+ init (filePath );
13+ }
614}
You can’t perform that action at this time.
0 commit comments