BOLT's nodes don't work after switching to IL2CPP and doing an AOT Prebuild

  1. I have a graph that places all buttons from an Aot list in a circle-shaped order around a place where a mouse (or finger) has pressed. This graph works perfectly in the editor but when I change a scripting backend to IL2CPP, do an AOT Prebuild and build my game to an Android it just stops working and all of the buttons are positioned at (0,0,0). It’s working fine if I don’t switch to IL2CPP.

I’m using Unity 2019.3.14f1 and Bolt 1.4.13.


An image of my flow graph that places buttons in a circle-shaped order.

This is how it looks in the editor.
181184-editor.png

If the bug is still present, there is a solution to it.
If you have IL2CPP turned on you have to do Tool → Bolt → Press “AOY Pre-Build …”.
It seems that all scripts after changing from Mono to IL2CPP need to be rebuilt.

Turns out that UnityEngine.Mathf doesn’t work with IL2CPP. So I changed it to System.Math and everything worked!