Author Topic: iOSTargetResolution action?  (Read 2964 times)


  • Full Member
  • ***
  • Posts: 187
iOSTargetResolution action?
« on: January 02, 2013, 08:51:53 AM »
I'd like to use an action to change the iOSTargetResolution depending on the device being ran on, looking at the Unity docs here 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?


  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOSTargetResolution action?
« Reply #1 on: January 02, 2013, 02:10:38 PM »

 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: