- Home /
Loading Script from Asset Bundle in iOS and WebGL.
Hi I am trying to load the script from the Asset Bundle like given in the link https://docs.unity3d.com/Manual/scriptsinassetbundles.html. I am able to load the script in Android. Not able to load the script in iOS and WebGL as they wont support the Reflection. Does anyone know alternate method to load script from the asset bundle In IOS and WEbGL ? Please share the knowledge if anyone has already tried this. Thankyou.
Answer by Marco-Trivellato · Sep 21, 2016 at 06:33 PM
iOS and WebGL are both Ahead-Of-Time compile platforms, so all scripts used at runtime need to shipped with the build.
Answer by tylo · Sep 22, 2016 at 10:34 PM
If your script is compiled with the project that is loading the AssetBundles, and that script has the same name as the script in the AssetBundle, then AssetBundles will automatically hook up to it.
Hi, does it work at the production, after uploading to Apple Appstore? Because I have the same scenario like you mention, Level with the objects and scripts are being bundled at the same project as it is going to be published. Whenever I want to release an update, I want to bundle new AssetBundle, upload to FTP and clients will be downloading. But I want to make sure it will not violate AOT :)