- Home /
Is there a way to set player preferences similar to the input manager?
I am working on a Unity project that will be installed in a museum. The program needs to communicate via UDP with another computer. Rather than hard coding variables within unity, I would like to be able to set preferences for some variables (IP addresses and port numbers) on first launch or when a key is held down on launch in a way similar to the input manager. Does Unity have an easy way to do this? Alternatively, I could read those variables from a .ini file or something similar. That is what I used to use with Director.
Answer by DaveA · Jul 13, 2011 at 07:14 PM
I think I know what you mean, and it would be cool if you could 'pull up' the Input manager while in the game (not just when it starts). I don't think it's possible I hope I'm wrong.
But you can always roll your own. Use PlayerPrefs to store/retrieve the settings.
Actually I don't need to pull up the input manager mid game. I'd just like to add a few non-input variables (strings and integers) to it. You're right, I could make a gui, and store those variables in the player prefs. I was hoping there was an easier extensible way already built into the game engine.
Your answer
Follow this Question
Related Questions
Passing a variable through the main menu 2 Answers
Clone new gameObject from variable 1 Answer
Assigning varaibles to prefabs 1 Answer
How to store a variable of the player 1 Answer
I am trying to access a variable from another script. 1 Answer