Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Start function is not getting called only when running in Android

Discussion in 'Android' started by David_L, May 14, 2014.

  1. David_L

    David_L

    Joined:
    May 14, 2014
    Posts:
    1
    Pretty new to Unity here, but decently familiar with Android and C#, so my problem may be something really obvious that I'm not aware of.

    Anyway, when I run the scene with the play button in Unity, everything works completely fine.

    But when I go to Build and Run to see it run on my phone, everything works without compile errors, but it's clear the start function isn't getting called. OnGUI is getting called, update appears to be getting called. But Start isn't. And it only doesn't in Android.

    Any ideas?

    Thanks

    edit: I can post anything from the code or other things from the project upon request
     
    Last edited: May 14, 2014
  2. ckrin

    ckrin

    Joined:
    Oct 8, 2013
    Posts:
    36
    do it! :)
     
  3. Dzxyan

    Dzxyan

    Joined:
    Sep 23, 2013
    Posts:
    167
    same word, post the code for view please.
     
  4. s_mc

    s_mc

    Joined:
    May 15, 2014
    Posts:
    1
    Having similar problem. Start not called before OnGUI, causing null reference errors. Only happens on Android. Works fine on iOS and desktop.
    What Unity version are you using?
     
  5. James_0124

    James_0124

    Joined:
    Feb 21, 2015
    Posts:
    5
    Same here.
    Start() doesn't seem to get called. Only on Android.
    But it does get called if I do transform.SetAsLastSibling().
     
  6. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Which unity version? 5.2.2 doesn't have this bug. Maybe you guys have 5.3?