Hiding the Home Button on iPhone X on the run

Hi, I need to hide the home button on iPhone X for my game. I know there is a player setting option for that, but I prefer to change this setting on the run in the script. According to Unity documentation here, it says “Home button can be hidden on runtime by changing iOS.Device.hideHomeButton property.” However, this property is in UnityEditor name space which is obviously not be accessible from the build. So I’m very confused about this. Anyone can tell me why? Thanks!

UnityEditor.PlayerSettings.iOS.hideHomeButtonis for the editor player settings
UnityEngine.iOS.Device.hideHomeButtonis for the runtime changes

1 Like

Great! Thank you so much for it:)

Hi

Yes, It’s working. But can we use in our project as I am afraid the app would be rejected by Apple by using above lines of code ?? Please suggest.

It won’t be rejected as far as I know. Because I used this in my project and Apple didn’t reject it. :slight_smile:

1 Like

Is this the same thing as check this option in the player settings?

8264313--1082139--upload_2022-7-8_21-45-4.png