Hi, I’m using Gui Mask Script in my game menus and after I switch to IL2CPP from Mono2x I get big performance slowdown (30-40 fps IL2CPP against 60 fps Mono2x). I use Release build schemes in Unity3d and xCode.
Is it known problem with IL2CPP? Maybe someone found any workaround?
I’m not aware of any existing bug reports we have on this issue. Can you submit a bug report and provide the project that demonstrates this? We would love to have a look and correct it.
Thanks for the information, we would definitely like to have a look at this issue. I’m not familiar with the “2D rectangle mask clipping that does not use stencil buffer” feature specifically, but I suspect that you are correct.
While I was trying to isolate problem to provide test scene I understand, that problem not in IL2CPP but in Metal API.
I used flag Automatic Graphics API and it looks like with Mono2x Unity choose OpenGLES2 or OpenGLES3 and I had 60 fps. But when I switch to IL2CPP Unity starts using Metal. After I forced to OpenGLES2 the problem is disappeared.
Top Profile: game session with 3d scene and opened menu (new GUI system and masks) - IL2CPP, Automatic Graphics API
Bottom Profile: same session with 3d scene (menu was closed) - IL2CPP, Automatic Graphics API
Game session with game 3d scene and opened menu (new GUI system and masks) - IL2CPP, forced OpenGLES2
Again, this problem is actual only for iPad mini 2 Retina (maybe Unity chooses different API for iPad and iPhone)