Playmaker Forum

PlayMaker Help & Tips => Android Help => Topic started by: artician on May 21, 2014, 11:23:13 PM

Title: Android build problems [SOLVED]
Post by: artician on May 21, 2014, 11:23:13 PM
I am trying to publish one of my finished projects to the Android store, and I'm running into some very strange problems.

I'm running Unity3.5.7 pro.
I'm building to Android and iOS with the free licenses.
This project is using Playmaker 1.6.1.
I'm still building an unsigned debug version.
My target device is an RCA 7" Tablet running aOS4.2.
I've published to iOS without issue.

I'm encountering two main problems.
1) It seems like the FSMs are being run out of order, because after the Unity splash screen disappears the first scene of the game that is displayed is the tutorial sequence.  Normally the tutorial is only shown after the title screen, but this appears as though the title screen FSM is being skipped.  The tutorial sequence runs correctly, displaying the four images that explain the game, and then no other scenes are run afterward.  The screen remains white.

The game in question is an interactive storybook for children.  I created an FSM for each scene in the game, treating them as very basic flow-charts.  The game is entirely linear so it's an extremely simple setup.

The Title screen FSM is the *only* FSM enabled when the game begins, and the Tutorial FSM is only activated by an event at the end of the Title screen FSM.  I removed all references to the Tutorial FSM to see if the game was loading the title and going strait to the end of the script, but this wasn't the case and somehow the game just bypasses it altogether and enables the Tutorial FSM on its own.

2) The second issue that I encountered is a problem with my scene camera.  As far as I know all mobile devices should scale the application to fit the screen unless they're specifically scripted otherwise, even if the result is distorted.  What I'm seeing is a cropped view of the game, as though it's rendering the game at a resolution 2x larger than the screen. 
I'm using an orthographic camera, and I have some 2dtk work in this project so I'm using some of his helpful camera scripts for resolution and ratio overrides.  I've made dozens of builds with combinations of configurations using such, and finally just output a build at the devices native resolution (1024x600), but all builds regardless of settings or resolutions look exactly the same.

The number of things wrong was a real surprise to me, since building to Web, PC, OSX and iOS all went through without a single issue.  As always, I greatly appreciate any input, suggestions on things I may not be aware of (debugging tools; I couldn't find any), or anything else.  I spent 16 hours today troubleshooting this so I'm at a complete loss.

Thank you!
Title: Re: Android build problems
Post by: artician on May 24, 2014, 07:23:14 AM
I have the inclination to bump this, but it's still at the top of the forum!  Does no one come in here any more?  ):
Title: Re: Android build problems
Post by: artician on May 27, 2014, 12:15:49 PM
Even if someone were to reply with "The solution is obvious, you're an idiot", it's better than nothing!  C'mon folks!  Even if you don't know, say so!  I am stuck from releasing this project because of these issues, and at least the first one is directly related to PM.  I've done as much testing and troubleshooting as I can at this point.
Title: Re: Android build problems
Post by: jess84 on May 28, 2014, 05:53:54 PM
Maybe post  some screenshots of your fsm  and action states?
Title: Re: Android build problems
Post by: artician on June 26, 2014, 11:32:18 AM
Posting the result for future reference to others:

It turns out this was entirely due to the hardware I was using.  I've never seen differing hardware cause such a mess with executing code before, but I exchanged the device for a Nexus 7 and things worked without a hitch.

TL;DR - NEVER buy an RCA Tablet.  Just don't.  Price appealing to indie devs, results not worth it.  (Look at the Amazon reviews.  My devices battery went bad on day #2).