|
how I can change the screen resolution in real time? i want put this:
But where I put it? Thanks in advance
(comments are locked)
|
|
There are many options. Here's an idea: Make a script JS/C# it doesn't matter right now which. Attach the script to an object that you can send input with the input manager. Make a method that responds to input. Set the value of the screen when the input matches that of the requirement for the method 'somekey' potentially you may want to have two public floats so you can change the values to (x,y) instead of your hardcoded (640,480). Having them public means you can change it quite easily in the inspector ( and it matters for inheritance , proper design and code safety , but I don't think you really need to know that right now for this question so if you don't know what it is just forget about it for the moment and assume public just let's you change it in the editor) So then the fields of the class and body of the change method would become:
Sorry if the code isn't that great, I had to look up most of the syntax since I don't understand JS that much, just C#. I hope this shows the general outline of such a script. Getting inputhandling done is something you should be able to do (yes even if you are not a programmer!) , but that is just my opinion very thanks you
Dec 08 '10 at 11:57 AM
raul corrales
(comments are locked)
|
