Search Unity

After press play button in project, UI element in scene no working

Discussion in '2D' started by zargontv, Oct 24, 2021.

  1. zargontv

    zargontv

    Joined:
    Nov 9, 2020
    Posts:
    13
    Recently, errors began to appear in the log and after starting the project in unity, the interface buttons are inactive. I use Unity IAP, Unity Ads.
    Please tell me, someone came across a similar one? Moreover, the problem is of a floating nature. Screenshot_8.png
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,452
    Note that this is the 2D features forum and this isn't a 2D feature related post and therefore I have no idea how to help you.
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,686
    Some of those errors make me think you're executing Unity code in a constructor, or else in an IAP callback that is not on the main thread. In Unity, 100% of everything you do against the engine API must be done in the main thread.

    This means no Unity code can be called in class constructors (static or instance) since those are NOT called from the main thread except for non-Unity classes that you new up yourself.

    Look at any one of the thousands of tutorials for doing IAP and follow their patterns.
     
    MelvMay likes this.
  4. zargontv

    zargontv

    Joined:
    Nov 9, 2020
    Posts:
    13
    Thanks. The fact is that until ~ October 14, everything worked fine, the project was successfully published in the Google Play Market, but the time has come to release Update and I faced such a problem.
     
  5. zargontv

    zargontv

    Joined:
    Nov 9, 2020
    Posts:
    13

    I'm sorry, I just didn't know which branch to address this problem to.