Search Unity

Issue with Game Foundation Rewards.

Discussion in 'Game Foundation' started by unity_9rZ2tQdXui6bvw, Jun 3, 2022.

  1. unity_9rZ2tQdXui6bvw

    unity_9rZ2tQdXui6bvw

    Joined:
    Sep 3, 2020
    Posts:
    2
    Hello! I have been messing around with Game Foundation. And have gotten all of the beginning tutorials working. Using this page.
    https://docs.unity3d.com/Packages/c...al/Tutorials/18-WorkingWithRewardPrefabs.html

    But when I start the game. In runtime. All of my rewards disappear, and the ui goes blank.
    I get an error that says. "Waiting for initialization" And was wondering what i was doing wrong. Or how long I have to wait for initialization.
    This is the error.
    "Game Foundation : RewardPopupView - Waiting for initialization.
    UnityEngine.GameFoundation.Components.RewardPopupView:Start() (at Library/PackageCache/com.unity.game-foundation@0.9.0-preview.3/Components/Runtime/RewardPopupView.cs:401)"

    And the pics below are before and after starting the game.
    Thank you!
    upload_2022-6-3_1-49-49.png
    upload_2022-6-3_1-50-15.png
     
  2. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @unity_9rZ2tQdXui6bvw,

    Just to let you know in case you're not aware, Game Foundation is no longer an actively supported project because a lot of its backend functionality was built into and expanded upon by Unity Gaming Services (UGS). Though UGS doesn't have an equivalent suite of prefabs like what you're using here, you can find some examples (including a daily rewards one) in the UGS samples project, if you're interested in switching to an actively supported product.

    My guess about the issue you're facing here with the Reward Popup, is that Game Foundation is not initialized yet when you load the scene. Ensure that you have either a Game Foundation Init prefab in the scene or that you are initializing manually (docs). I know you've said you followed the tutorials so it should already be initializing, but perhaps when you run the scene with the reward popup in it, it's not initialized there?
     
  3. tracyberges

    tracyberges

    Joined:
    Nov 10, 2023
    Posts:
    1
    Useful information.