Unity remote config help

I’m currently trying to use unity remote config to change some text but its not working. Every time I hit the play button, the text disappears and the remote config string text doesn’t show up.
Code:

    public Text NewText;

    public struct userAttributes { }
    public struct appAttributes { }
   
    void Awake()
    {
        ConfigManager.FetchCompleted += SetText;
        ConfigManager.FetchConfigs<userAttributes, appAttributes>(new userAttributes(), new appAttributes());
    }

    // Is called on awake
    void Update()
    {
        ConfigManager.FetchConfigs<userAttributes, appAttributes>(new userAttributes(), new appAttributes());
    }

    void SetText(ConfigResponse response)
    {
        NewText.text = ConfigManager.appConfig.GetString("NewsForLauncher");
    }

Welcome to the Unity Forums! So you know, you generally should not place code like that in Update, it will get called perhaps more than 60 times a second. You only need it once. Please use the example code from the documentation, get it working, then add your customization. https://docs.unity3d.com/Packages/com.unity.remote-config@1.2/manual/CodeIntegration.html

1 Like

Thank you for the help!