private static void OnDomainReload()
        {
            var setting = EditorBuildConfigs.GetActiveSettings <BundleIdentifierSetting>();

            if (setting == null)
            {
                return;
            }

            foreach (var buildTargetGroup in BuildTargetGroupUtil.GetValid())
            {
                var currentBundleId = PlayerSettings.GetApplicationIdentifier(buildTargetGroup);

                if (string.IsNullOrEmpty(setting.bundleId))
                {
                    if (string.IsNullOrEmpty(currentBundleId) == false)
                    {
                        setting.bundleId = currentBundleId;
                        break;
                    }
                }
                else if (setting.bundleId != currentBundleId)
                {
                    PlayerSettings.SetApplicationIdentifier(buildTargetGroup, setting.bundleId);
                }
            }
        }
Ejemplo n.º 2
0
        public override void InitializeOnLoad(AppConfig.AppConfig appConfig)
        {
            var setting = appConfig.GetSettings <BundleIdentifierSetting>();

            foreach (var buildTargetGroup in BuildTargetGroupUtil.GetValid())
            {
                var currentBundleId = PlayerSettings.GetApplicationIdentifier(buildTargetGroup);

                if (setting.bundleId != currentBundleId)
                {
                    PlayerSettings.SetApplicationIdentifier(buildTargetGroup, setting.bundleId);
                }
            }
        }