Hello Guest

Author Topic: Workflow to support multiple iOs Devices  (Read 6512 times)

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Workflow to support multiple iOs Devices
« on: August 31, 2013, 05:06:30 pm »
Hi,

What is he basic workflow for creating an app which supports iPad, iPhone and retina/ non retina.  I assume you work with assets at highest resolution...but am new to 2D Toolkit and Unity, so any pointers appreciated.

I

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Workflow to support multiple iOs Devices
« Reply #1 on: August 31, 2013, 09:09:42 pm »
This documentation goes through the basics of platform sprite collections - letting you swap between 1x, 2x and 4x sprites.
http://unikronsoftware.com/2dtoolkit/doc/2.20/advanced/platform_specific_sprite_collections.html

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Workflow to support multiple iOs Devices
« Reply #2 on: August 31, 2013, 09:13:38 pm »
Thanks.

Do I need to do anything or if I provide the assets does the device get detected and the relevant named assets get selected at runtime automatically?

Regards

i

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Workflow to support multiple iOs Devices
« Reply #3 on: August 31, 2013, 09:18:21 pm »
ok...just saw the startup code required.  So you detect the device and set the assets accordingly?  How about different devices?  I.e do you need iPad graphics separate to iPhone graphics to deal with differing screen resolutions?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Workflow to support multiple iOs Devices
« Reply #4 on: August 31, 2013, 09:53:45 pm »
Thats up to you - it depends very much on the game you're making as much as anything else. You can tweak the camera to accommodate, etc. If you've got a single screen game, then you'll probably need a custom background for each platform.

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Workflow to support multiple iOs Devices
« Reply #5 on: September 01, 2013, 12:21:04 am »
Thanks, sorry to ask such dumb questions - but what do you mean by tweak the camera.  If I build for iPhone, how do I detect iPad and tweak the camera to compensate.  Are there any example projects?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Workflow to support multiple iOs Devices
« Reply #6 on: September 01, 2013, 01:29:35 pm »
You detect iPad the same way you detect it in any Unity game...
http://answers.unity3d.com/questions/383403/detecting-whether-your-game-is-running-on-ipad-or.html

What you do to tweak the camera really depends on what you want to do. Do you want to zoom out to display more data? Scale the contents to fill the screen? Scale non uniformly? You can use the tk2dCamera and configure this the way you need to.
http://unikronsoftware.com/2dtoolkit/doc/2.20/reference/tk2dcamera.html

indy2005

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Workflow to support multiple iOs Devices
« Reply #7 on: September 01, 2013, 02:39:02 pm »
Thanks...so you can use Preview Resolution to simulate different devices, and see the impact of different overrides?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Workflow to support multiple iOs Devices
« Reply #8 on: September 01, 2013, 02:49:54 pm »
Yes. Basically set game window resolution to quickly switch presets.