Tuesday, October 13, 2015

I recently implemented an in-game options menu in Unity. Mine looks something like the thing above. A surprising amount of the required functionality is already implemented in Unity, you just have to write some code to hook into it. In the cases when Unity didn't already have a static variable for a particular setting, like mouse sensitivity or menu language, then I'd implement my own static variable that worked with a specific PlayerPrefs key.

Anyway, here's a bunch of workflow / specific API calls that I found very useful when I did it...

Create a separate UI Canvas for your options menu, then save that whole object as your menu prefab. You can now instantiate this menu prefab into every game scene with minimal mess.