Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jessee03 · Oct 12, 2011 at 09:11 PM · devices

Releasing on different devices

I'm about to release my game and was wondering about programming controls for different devices. Right now I want to release my game on ipad / iphone but am unsure of what code I would need to change. I need to program touch pad controls which is not in my current version. Would I need to change my controls for ipad, iphone, xbox, android, ect. Or can I just add an || statement for each control so no matter what system it's released on the controls will function or will it give errors. Also can I code the controls in unity for ipad / iphone or do I need to port it using the iphone sdk and change the controls there ?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by DaveA · Oct 12, 2011 at 09:55 PM

You shouldn't need the iphone sdk aside from the black-box that is the 'build and run' process where Unity launches xcode and does it all for you.

You could pepper your code with things like

 #if UNITY_ANDROID || UNITY_IPHONE
   .. do it this way..
 #endif
 
 #if UNITY_WEBPLAYER
  ..  do it that way ...
 #endif
 
 or 
 
 if (Application.platform == RuntimePlatform.IPhonePlayer)
  .. do that too ..

see http://unity3d.com/support/documentation/Manual/Platform%20Dependent%20Compilation.html

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jessee03 · Oct 12, 2011 at 10:39 PM 0
Share

Is there a program$$anonymous$$g section for the different touch screen functions for ipod / ipad ?

What you've posted does answer my much needed questions though ! thanks

avatar image
1

Answer by jahroy · Oct 12, 2011 at 11:03 PM

I would start here:

http://unity3d.com/support/documentation/Manual/Input.html

Then I would go here:

http://unity3d.com/support/documentation/ScriptReference/Input.html

There are situations where normal (mouse) input can be interpretted properly by a touchpad device, but most of the time you'll have to handle the touch input separately yourself.

iPhone, iPad, and iPod touch input should all be the same with few exceptions (an iPod touch might not be able to handle 10 touches on the screen at the same time).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Are random numbers consistent across devices? 1 Answer

How to get Audio output devices(Speaker) list in Unity? Like Microphone device list.. 1 Answer

Audio not working through headphones in editor 0 Answers

Official list of supported Android devices? 5 Answers

How to make a responsive game? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges