Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: derkoi on January 02, 2013, 08:51:53 AM
-
I'd like to use an action to change the iOSTargetResolution (http://docs.unity3d.com/Documentation/ScriptReference/iOSTargetResolution.html) depending on the device being ran on, looking at the Unity docs here (http://docs.unity3d.com/Documentation/ScriptReference/iOSTargetResolution.html) it seems that:
To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.
Anyone know how I can do that with a playmaker action? Do I simply add using UnityEditor to the action and move the action script to the Assets/Editor folder?
-
Hi,
PlayMaker only works with the runtime library, the "UnityEditor" namespace is only available within Unity Editor, this is used to run all the various views and editor, but can not be used by the game itself.
you can not change the target Resolution after you published. The solution is to create dynamic layout, and if you are looking for supporting Retina, then you'll have to provide both set of graphics. I never did this yet, so correct me if I am wrong here.
Right now, I would simply get the resolution of the screen using "Get screen height" and "Get Screen Width" Actions:
https://hutonggames.fogbugz.com/default.asp?W446
Bye,
Jean