- Home /
Make a Visual Script / Bolt script addressable. Possible on AOT platforms?
I though I had found a really powerful use of Visual Scripting, in that we could make visual scripts Addressable, then immediately push them to users for hotfixes, etc., and they would just be compiled at runtime.
I tried this with Visual Script assets that do a simple call to Debug.Log, and it worked great.
However, anything more complicated than that and it falls apart. I can't seem to interface with anything. I think it's an AOT thing... I gather some things are supposed to be compiled ahead of time, which I get. But shouldn't there be a way to frontload all that compilation into something Visual Scripts can link into, so their content can be loaded at runtime? I thought that's what I was doing when I generated UnitOptions.db, but I guess not.
Here's an example of what I get on iOS when I try to call a function on an AudioSource:
Exception: ExecutionEngineException: Attempting to call method 'Unity.VisualScripting.InstancePropertyAccessor`2[[UnityEngine.AudioSource, UnityEngine.AudioModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]::.ctor' for which no ahead of time (AOT) code was generated.