Cannot get Metal Performance HUD To Toggle On/Off

I am unable to get the Metal Performance HUD to toggle on/off on command on iOS 16+.

I AM able to get it to display permanently by setting user preferences, but that is not useful for my needs.

I have been referencing the presentation video: https://developer.apple.com/videos/play/tech-talks/110339/

I've attached my mm file. I've proven it to reliably execute by hitting set break points.

I've also attached a screen shot of my info.plist using MetalHUDEnabled=YES.

Note that when it is displayed I see the HUD say it is in composite mode. I'm not sure if that is creating an issue or not.

Also note that I am working in Unity and using this plugin as a superior toggleable FPS counter.

Am I missing something? Or is this feature just not working as advertised yet?

Answered by wallacebnf in 750881022

After receiving support from Unity, we discovered that the info.plist row should actually be "MetalHudEnabled=YES".

The official presentation video says to use "HUD" in all caps but that is not true.

With this I am able to toggle the Metal Performance Hud on/off on command from my program.

Hopefully this post helps anyone else attempting the same functionality.

Is that a space before "MetalHUDEnabled" or it's just Xcode indenting things in a weird way?

I've attached an expanded screenshot of the info.plist to demonstrate XCode's indenting.

Accepted Answer

After receiving support from Unity, we discovered that the info.plist row should actually be "MetalHudEnabled=YES".

The official presentation video says to use "HUD" in all caps but that is not true.

With this I am able to toggle the Metal Performance Hud on/off on command from my program.

Hopefully this post helps anyone else attempting the same functionality.

Cannot get Metal Performance HUD To Toggle On/Off
 
 
Q