DEV Community

Juego Studios
Juego Studios

Posted on

Using Firebase Remote Config as Feature Flags in a Unity Mobile Game: A Setup Checklist for Teams in India

Shipping a new APK or AAB every time you want to tweak a difficulty curve or switch off a broken event is slow anywhere. In India it hurts more: plenty of players stay on older builds for weeks because of limited storage or mobile data, so a fix that needs an update may never reach a big share of your audience. Remote config flags let a small team change behaviour on the live game without waiting on store review or on players to update.

Here's the setup checklist we'd suggest for small Unity mobile teams in India using Firebase Remote Config as a lightweight feature-flag system. It assumes you've already added the Firebase Unity SDK and the Remote Config package to your project.

1. Decide what belongs in Remote Config, and what doesn't

Good candidates are values you may need to change quickly and that are safe to change on a running game:

  • Difficulty and economy tuning: enemy health multipliers, reward amounts, energy refill times
  • Event switches: whether a Diwali, Holi or IPL-season event is visible, and its start and end dates
  • Kill switches: turning off a feature that's crashing or being exploited
  • Copy and offer text that marketing wants to adjust

Keep secrets, prices that must match your store listings, and anything that should be validated by a server out of it. Remote Config values are delivered to the client, so treat them as public.

2. Name keys so the whole team can read them

Agree a naming convention before the first key goes in, for example feature_area_name:

event_diwali_enabled
event_diwali_end_utc
economy_daily_reward_coins
difficulty_level_hp_multiplier
killswitch_friend_invites
Enter fullscreen mode Exit fullscreen mode

Write the list down in your design doc with the type, default and owner of each key. Twenty undocumented keys become a guessing game very quickly.

3. Set in-app defaults for every key

The game must behave sensibly on first launch with no network, which is common on patchy connections. Set defaults in code before you fetch anything:

using System.Collections.Generic;
using System.Threading.Tasks;
using Firebase.RemoteConfig;

public static class RemoteFlags
{
    public static Task InitAsync()
    {
        var defaults = new Dictionary<string, object>
        {
            { "event_diwali_enabled", false },
            { "economy_daily_reward_coins", 100 },
            { "difficulty_level_hp_multiplier", 1.0 },
            { "killswitch_friend_invites", false }
        };
        return FirebaseRemoteConfig.DefaultInstance.SetDefaultsAsync(defaults);
    }
}
Enter fullscreen mode Exit fullscreen mode

Defaults should always be the safe option: events off, kill switches off, tuning at the values you shipped with.

4. Fetch on boot, activate at a safe moment

Fetching and activating are separate steps for a reason. Fetch in the background during your loading screen, then activate at a point where values changing won't confuse anyone, such as the next time the player returns to the main menu, rather than in the middle of a level.

public static async Task FetchAsync()
{
    var rc = FirebaseRemoteConfig.DefaultInstance;
    await rc.FetchAsync(System.TimeSpan.FromHours(1));
}

public static Task ActivateAsync()
{
    return FirebaseRemoteConfig.DefaultInstance.ActivateAsync();
}
Enter fullscreen mode Exit fullscreen mode

FetchAndActivateAsync() is fine for values that only matter at boot. Wrap fetches in a timeout and never block the game on them: if the fetch fails, the player gets the cached or default values and carries on.

5. Respect the fetch interval and caching rules

Remote Config caches fetched values on the device and throttles how often a client can fetch. Use a short minimum fetch interval only in development builds; in production, an interval of an hour or more keeps you within limits and saves players' data. Plan your live operations around that: a change you publish now reaches players on their next eligible fetch, not instantly. If you need faster changes for kill switches, look at the real-time Remote Config listener in the SDK, and test it on a real device on a slow network.

6. Read values through one wrapper

Don't scatter GetValue("...") calls across the codebase. Read every flag through one class with typed properties, so a typo in a key name is caught in one place:

public static bool DiwaliEventEnabled =>
    FirebaseRemoteConfig.DefaultInstance.GetValue("event_diwali_enabled").BooleanValue;

public static long DailyRewardCoins =>
    FirebaseRemoteConfig.DefaultInstance.GetValue("economy_daily_reward_coins").LongValue;
Enter fullscreen mode Exit fullscreen mode

7. Use conditions carefully for festival offers

Remote Config conditions let you target values by app version, platform, country, user property or a random percentage of users. That's useful for rolling out a festival offer to a slice of players first, or for keeping a new tuning value away from an old build that can't handle it. Keep the number of conditions small and named clearly, because conditions interact and are easy to forget about after the event ends.

8. Give the team a change process

A config change is a release, even without a new build. Before publishing in the console:

  • Someone other than the author reviews the change
  • The change is noted in your team channel with the reason and expected effect
  • You know how to roll back: the console keeps template versions you can restore
  • You watch crash and analytics dashboards for an hour afterwards

Teams in India often run live events around evening peaks and weekends, so avoid publishing big changes just before you all log off.

Wrapping up

Remote Config won't replace a proper backend for anything that needs validation, but for tuning, event switches and kill switches it gives a small team a lot of control for very little setup. It pairs well with good game design decisions made early. If you're planning a casual title, we wrote about seven decisions before building a puzzle game for Indian mobile players.

If you need a team to help build or run a live mobile game, Juego Studios is a mobile game development company working with Unity on Android and iOS.

Top comments (0)