• 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
1
Question by ArmanOhanian · May 25, 2015 at 06:22 PM · tutorials

Survival Shooter tutorial sluggish on Android.

I have tried posting this in the tutorials Q&A forum but the place seems to have gone silent. The question is about this tutorial here: https://unity3d.com/learn/tutorials/projects/survival-shooter

So, here it is again:


For the fun of it, I took this tutorial mobile and built an Android version. I used the CrossPlatformInputManager to get the tilt controls, etc etc...

It plays fine on the PC and in the editor with Unity Remote. However, when I install it on my Android devices, the performance is horrible! I have tried this across 3 different devices and none performed: Moto G (2nd gen), Galaxy Tab 2, and Blu (something)...

While I may have a clue why that is (guessing high-vertix count models?), I'd like here your professional opinion.

If I did the math correctly, I am getting 7-12 frames per second.

Thanks!

Comment
Add comment · Show 7
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 tanoshimi · May 25, 2015 at 06:28 PM 1
Share

An Android tablet has a fraction of the processing power of a typical desktop PC, so you'd expect the game to run at a fraction of the speed, which is what you're seeing... that's one of the reasons why good mobile games tend to be designed specifically for mobile from the outset.

Whether the game is being specifically limited by vertices/tri/fill rate/physics etc is for you to answer using the Profiler.

avatar image ArmanOhanian · May 26, 2015 at 07:05 PM 1
Share

@tanoshimi, thanks for the quick response and pointing me to the Profiler. I have been playing with Unity for about a week and have not yet had the chance to explore the Profiler.

It's perfectly clear that PC has more powerful hardware than a tablet.

What I want to get opinion on is why this specific game should have issues on mobile? There is very little to it, I$$anonymous$$HO. The triangle counts seem to be reasonable too, again I$$anonymous$$HO.

I am having similar experience porting the Space Shooter to Android as well.

I want to know if anyone has tried to do that and has thoughts on it.

The bigger question is whether or not the Unity engine is light-weight enough to be used reliably on mobile platforms. I want to get that sense.

avatar image tanoshimi · May 26, 2015 at 07:39 PM 1
Share

Well, Unity was good enough for mobile games such as $$anonymous$$onument Valley, Device 6, The Room, Hitman Go...

avatar image ArmanOhanian · May 26, 2015 at 08:21 PM 0
Share

now that's an answer I can use. :)

Thank you.

avatar image Spartan_Boy · Jun 02, 2015 at 03:22 PM 0
Share

Hi! Could you tell us more about the mobile controls, i tried compiling it with Unity 5 and the new cros sinput platform and could get it to work at all! THX

Show more comments

2 Replies

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

Answer by ArmanOhanian · Jun 02, 2015 at 06:57 PM

@Spartan_Boy, As I remember, I used CrossPlatformInputManager as described in the guide that comes with it.

Basically,

     //Replace the commented code with the new code, as described below.
     // Don't forget to fix the variable names and check the syntax.
     
     // float moveH = Input.GetAxisRaw("Horizontal");
     float moveH =CrossPlatformInputManager.GetAxisRaw("Horizontal") ;
     
     
     // float moveV = Input.GetAxisRaw("Vertical");
     float moveV =CrossPlatformInputManager.GetAxisRaw("Vertical") ;
 
 
 

This is what I remember off the top of my head. If that's not what I did, I will post back after getting home and checking the code.

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
avatar image
0

Answer by Spartan_Boy · Jun 04, 2015 at 07:26 AM

Hi thx a bunch for your answer, I double checked it and it returns no error but i already have the correct code in playermovement script :( float h = CrossPlatformInputManager.GetAxisRaw("Horizontal"); float v = CrossPlatformInputManager.GetAxisRaw("Vertical"); [...] I think it comes from thenamespace with the samples vs standard assets. I can't seem to fix it and find a workaround.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do i make an animation 6 Answers

How do I get started with iPhone/iPad game dev? 3 Answers

Tutorials arent specific 1 Answer

GUI scripting? continued 2 Answers

Where can I find some good JavaScript tutorials ? 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