Loading content at runtime with HoloLens and IL2CPP
I'm working on a HoloLens application that requires loading new content dynamically. In a very basic scenario this is what I imagine:
The user is able to load small holograms to his environment
Holograms could have simple scripts attached, e.g. switching colors when they get clicked
The collection of holograms is extendable even after the app has been published. It is possible to add new holograms with their own scripts so the user can get new content.
I already learned that the usual mechanism for something like this is to use Asset Bundles - but it seems that this approach does not work for IL2CPP based platforms like UWP or IOS.
As this seems to be a very basic concept of game development I guess there are other ways to make something like this work? Or is this simply a limitation of Unity in this case?
Answer by JoshPeterson · Oct 24, 2018 at 11:49 AM
Note that is possible to use Asset Bundles with IL2CPP on any platform. However, since IL2CPP is an ahead-of-time compiler, it needs to have access to all of the code that will run at compile time. So you cannot ship new script code in asset bundles.
Do you know if there are any workarounds available? Are there any public plans on providing functionality like that in a future version of Unity?
No, we don't have any work-arounds or public plans to support dynamic code content with IL2CPP. I wouldn't rule it out, but nothing is available in the near term.
Your answer
Follow this Question
Related Questions
Unity iOS - Cannot import functions from .Bundle 0 Answers
Whats happened with the Asset Bundle Manager? 1 Answer
A little doubt about creating a Talking BOT that simulates AI, for iOS system using Unity. 0 Answers
Assetbundle for Windows Phone 8.1 Universal - Error: assetbundle.mainAsset is null 0 Answers
IOS AssetBundle.Unload 0 Answers