{"id":27523453,"url":"https://github.com/rimurudev/unity-firebase-remoteconfig-for-unityeditor","last_synced_at":"2026-02-17T21:32:29.765Z","repository":{"id":286260060,"uuid":"960884230","full_name":"RimuruDev/Unity-Firebase-RemoteConfig-For-UnityEditor","owner":"RimuruDev","description":"Unity Firebase Remote Config For Unity Editor - Этот небольшой набор скриптов позволяет в Editor Mode (без запуска Play Mode) принудительно обновлять значения из Firebase Remote Config, игнорируя кеш и не дожидаясь очередного перезапуска Unity или домейн‐релода.","archived":false,"fork":false,"pushed_at":"2025-04-05T09:31:57.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T00:20:21.471Z","etag":null,"topics":["abyssmoth","firebase","firebase-remote-config","firebase-unity","firebase-unity-remote-config","rimuru-dev","rimurudev","unity-editor-firebase-remote-config","unity-editor-remote-config","unity-firebase","unity-firebase-remote-config"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RimuruDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-05T09:19:49.000Z","updated_at":"2025-04-05T15:09:52.000Z","dependencies_parsed_at":"2025-04-05T10:25:37.641Z","dependency_job_id":"239fb7ee-78eb-4092-bbe8-9e26d882a9da","html_url":"https://github.com/RimuruDev/Unity-Firebase-RemoteConfig-For-UnityEditor","commit_stats":null,"previous_names":["rimurudev/unity-firebase-remoteconfig-for-unityeditor"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/RimuruDev/Unity-Firebase-RemoteConfig-For-UnityEditor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-Firebase-RemoteConfig-For-UnityEditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-Firebase-RemoteConfig-For-UnityEditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-Firebase-RemoteConfig-For-UnityEditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-Firebase-RemoteConfig-For-UnityEditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RimuruDev","download_url":"https://codeload.github.com/RimuruDev/Unity-Firebase-RemoteConfig-For-UnityEditor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RimuruDev%2FUnity-Firebase-RemoteConfig-For-UnityEditor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504615,"owners_count":23618831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abyssmoth","firebase","firebase-remote-config","firebase-unity","firebase-unity-remote-config","rimuru-dev","rimurudev","unity-editor-firebase-remote-config","unity-editor-remote-config","unity-firebase","unity-firebase-remote-config"],"created_at":"2025-04-18T12:01:12.021Z","updated_at":"2026-02-17T21:32:24.721Z","avatar_url":"https://github.com/RimuruDev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity Firebase Remote Config For Unity Editor\n\nЭтот небольшой набор скриптов позволяет в **Editor Mode** (без запуска Play Mode) принудительно обновлять значения из **Firebase Remote Config**, игнорируя кеш и не дожидаясь очередного перезапуска Unity или домейн‐релода.\n\n---\n\n## Предыстория\n\nВ старых (да и некоторых новых) версиях Firebase Remote Config для Unity есть проблема: при повторном запросе **вне** Play Mode SDK часто отдаёт устаревшие данные из кеша, пока не произойдёт перезагрузка скриптового домена (например, при запуске Play Mode или перезагрузке Unity). В результате любые изменения, опубликованные в Firebase Console, не сразу подтягиваются в редакторе.\n\n**Решение** – «насильно» переинициализировать Firebase и очищать внутренние структуры, связанные с Remote Config, используя методы, недоступные напрямую (например, `FirebaseApp.DisposeAllApps()`), чтобы получить новую «сессию» Firebase и запросить актуальные данные.\n\n---\n\n## Как установить\n\n1. Скопируйте три скрипта (`FirebaseAppHelper.cs`, `FirebaseRemoteConfigHelper.cs`, `RemoteConfigEditor.cs`) в свой Unity‐проект, желательно в папку **Editor**.\n2. Убедитесь, что в проекте уже установлен и подключён **Firebase Remote Config SDK**.\n3. Откройте в Unity меню **RimuruDev Tools → Firebase RemoteConfig Editor**.\n\n---\n\n## Как пользоваться\n\n1. **Print RemoteConfig Cache**  \n   Выводит в консоль текущее содержимое внутреннего словаря, где `FirebaseRemoteConfig` хранит свои экземпляры.\n\n2. **Restart Firebase and Fetch Remote Config**\n    - Очищает кеш Remote Config.\n    - Через рефлексию вызывает `FirebaseApp.DisposeAllApps()`, «раз‐инициализируя» Firebase.\n    - Повторно инициализирует Firebase, выставляет `MinimumFetchInterval` в ноль (чтобы отключить кеш).\n    - Выполняет `FetchAsync` и `ActivateAsync`.\n    - Выводит полученные актуальные данные в окно (и в консоль).\n\n\u003cimg width=\"379\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8fe247c4-e856-49a1-bcb8-686bf1c967fa\" /\u003e\n\n---\n\n\u003cimg width=\"622\" alt=\"image\" src=\"https://github.com/user-attachments/assets/176b6636-22ea-43ba-ba48-6c91359f3de5\" /\u003e\n\n\u003cimg width=\"1146\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e9bb707a-74c2-41ff-be8b-57c4291744eb\" /\u003e\n\n\u003cimg width=\"388\" alt=\"image\" src=\"https://github.com/user-attachments/assets/53852bb0-1d48-4894-ae84-4a62d8f09f81\" /\u003e\n\n\nТаким образом, вы можете многократно изменять параметры Remote Config в консоли, публиковать их, а затем нажимать «Restart Firebase and Fetch Remote Config» — и получать новые значения **сразу**, без запуска Play Mode и без перезапуска Unity.\n\n---\n\n## Важные детали\n\n- Код основан на рефлексии и доступе к внутренним методам Firebase SDK, то есть **официально не поддерживается**. Однако для тестирования и отладки этого вполне достаточно.\n- Тестировалось на:\n    - **Firebase Remote Config** версии `12.2.1`\n    - **Unity 2022.3.35f1**\n- Успешно применялось в реальном проекте с большой пользовательской базой.\n- В релизных сборках (на девайсах/платформах) кеш работает штатно; проблема возникает только при «горячем» тестировании в редакторе.\n\n---\n\n## Лицензия\n\nЛицензируется под [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frimurudev%2Funity-firebase-remoteconfig-for-unityeditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frimurudev%2Funity-firebase-remoteconfig-for-unityeditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frimurudev%2Funity-firebase-remoteconfig-for-unityeditor/lists"}