コード例 #1
0
    public static SettingsProvider CreateGameTuneSettingsProvider()
    {
        var provider = new SettingsProvider("Project/GameTuneIMGUISettings", SettingsScope.Project)
        {
            label      = "GameTune Settings",
            guiHandler = (searchContext) =>
            {
                var settings = GameTuneSettings.GetSerializedSettings();
                GUILayout.BeginVertical(EditorStyles.helpBox);
                {
                    GUILayout.Label("iOS ad settings", EditorStyles.boldLabel);
                    GUILayout.Label("If your game includes any ad framework you should also include AdSupport on iOS for GameTune. If not then you must not include it.", new GUIStyle(EditorStyles.label)
                    {
                        wordWrap = true
                    });
                    EditorGUILayout.PropertyField(settings.FindProperty("includeAdSupport"), new GUIContent("Include AdSupport on iOS"));
                }
                GUILayout.EndVertical();
                settings.ApplyModifiedProperties();
            },

            keywords = new HashSet <string>(new[] { "GameTune" })
        };

        return(provider);
    }
コード例 #2
0
    private static bool ShouldExcludeAdSupport(string path)
    {
        var settings = GameTuneSettings.GetSerializedSettings();

        return(!settings.FindProperty("includeAdSupport").boolValue);
    }