コード例 #1
0
        private void DrawCustomPlatformLinkInformation()
        {
            GUILayout.Label("Platform Override Configurations", EditorStyles.boldLabel);
            foreach (SupportedPlatforms value in Enum.GetValues(typeof(SupportedPlatforms)))
            {
                _platformsWithCustomData[value] = EditorGUILayout.BeginToggleGroup(value.ToString(), _platformsWithCustomData[value]);

                if (_platformsWithCustomData[value])
                {
                    _config.ActivatePlatformOverride(value);
                    var deepLinking       = _config.GetPlatformDeepLinkingProtocols(value);
                    var domainAssociation = _config.GetPlatformDomainProtocols(value);
                    if (deepLinking == null)
                    {
                        deepLinking = _config.GetCustomDeepLinkingProtocols(value);
                    }

                    if (domainAssociation == null)
                    {
                        domainAssociation = _config.GetCustomDomainAssociation(value);
                    }


                    DrawLinkInformation(deepLinking, string.Format(DeepLinkLabelFormat, value.ToString()), value != SupportedPlatforms.Linux && value != SupportedPlatforms.Windows);
                    if ((value == SupportedPlatforms.Linux || value == SupportedPlatforms.Windows || value == SupportedPlatforms.OSX) == false)
                    {
                        DrawLinkInformation(domainAssociation, string.Format(DomainAssociationLabelFormat, value.ToString()));
                    }
                }
                else
                {
                    _config.DeactivatePlatformOverride(value);
                }
                EditorGUILayout.EndToggleGroup();
            }
        }