private void Settings()
        {
            Texture2D settings_icon = SA_EditorAssets.GetTextureAtPath(ISD_Skin.ICONS_PATH + "isdSettings.png");

            using (new SA_WindowBlockWithIndent(new GUIContent("Settings", settings_icon))) {
                bool isEnabled = ISD_Settings.PostProcessEnabled;
                EditorGUI.BeginChangeCheck();
                isEnabled = SA_EditorGUILayout.ToggleFiled("Build PostProcess", isEnabled, SA_StyledToggle.ToggleType.YesNo);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorUtility.DisplayDialog("Configuration", "Changes will be applide after scripts re-recompilation is completed", "Okay");
                    if (isEnabled)
                    {
                        SA_EditorDefines.RemoveCompileDefine("ISD_DISABLED", BuildTargetGroup.iOS);
                    }
                    else
                    {
                        SA_EditorDefines.AddCompileDefine("ISD_DISABLED", BuildTargetGroup.iOS);
                    }
                }

                if (!ISD_Settings.PostProcessEnabled)
                {
                    EditorGUILayout.HelpBox("Build PostProcess is curreently disabled. " +
                                            "The XCode project will not be modifayed.", MessageType.Error);
                }
            }
        }
Beispiel #2
0
 private void ChangeDefines(bool IsEnabled)
 {
     if (IsEnabled)
     {
         SA_EditorDefines.AddCompileDefine(DefineName, BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX);
     }
     else
     {
         SA_EditorDefines.RemoveCompileDefine(DefineName, BuildTarget.iOS, BuildTarget.tvOS, BuildTarget.StandaloneOSX);
     }
 }
 private void ChangeDefines(bool IsEnabled)
 {
     if (IsEnabled)
     {
         SA_EditorDefines.AddCompileDefine(DefineName, BuildTargetGroup.iOS);
     }
     else
     {
         SA_EditorDefines.RemoveCompileDefine(DefineName, BuildTargetGroup.iOS);
     }
 }
        private static void CheckForUnityAdsSDK(string assetPath, bool enabled)
        {
            string fileName = SA_PathUtil.GetFileName(assetPath);

            if (fileName.Equals(UNITY_ADS_LIB_NAME))
            {
                UpdateSDKDefine(enabled, UNITY_ADS_INSTALLED_DEFINE);
            }

            SA_EditorDefines.RemoveCompileDefine(UNITY_ADS_INSTALLED_DEFINE, BuildTarget.tvOS);
        }
 private static void UpdateSDKDefine(bool enabled, string define)
 {
     if (enabled)
     {
         if (!SA_EditorDefines.HasCompileDefine(define))
         {
             SA_EditorDefines.AddCompileDefine(define);
         }
     }
     else
     {
         if (SA_EditorDefines.HasCompileDefine(define))
         {
             SA_EditorDefines.RemoveCompileDefine(define);
         }
     }
 }
 private static void UpdateAnalyticsLibState(bool enabled)
 {
     if (enabled)
     {
         if (!SA_EditorDefines.HasCompileDefine(AN_FIREBASE_ANALYTICS_DEFINE))
         {
             SA_EditorDefines.AddCompileDefine(AN_FIREBASE_ANALYTICS_DEFINE);
         }
     }
     else
     {
         if (SA_EditorDefines.HasCompileDefine(AN_FIREBASE_ANALYTICS_DEFINE))
         {
             SA_EditorDefines.RemoveCompileDefine(AN_FIREBASE_ANALYTICS_DEFINE);
         }
     }
 }
 private static void UpdateMessagingLibState(bool enabled)
 {
     if (enabled)
     {
         if (!SA_EditorDefines.HasCompileDefine(AN_FIREBASE_MESSAGING_DEFINE))
         {
             SA_EditorDefines.AddCompileDefine(AN_FIREBASE_MESSAGING_DEFINE);
         }
     }
     else
     {
         if (SA_EditorDefines.HasCompileDefine(AN_FIREBASE_MESSAGING_DEFINE))
         {
             SA_EditorDefines.RemoveCompileDefine(AN_FIREBASE_MESSAGING_DEFINE);
         }
     }
 }
 private static void UpdateLibState(bool fbLibFound)
 {
     if (fbLibFound)
     {
         if (!SA_EditorDefines.HasCompileDefine(SA_FB_INSTALLED_DEFINE))
         {
             SA_EditorDefines.AddCompileDefine(SA_FB_INSTALLED_DEFINE);
         }
     }
     else
     {
         if (SA_EditorDefines.HasCompileDefine(SA_FB_INSTALLED_DEFINE))
         {
             SA_EditorDefines.RemoveCompileDefine(SA_FB_INSTALLED_DEFINE);
         }
     }
 }
 private void DefineSymbols()
 {
     using (new SA_H2WindowBlockWithSpace(new GUIContent("SCRIPTING DEFINE SYMBOLS")))
     {
         var defines = SA_EditorDefines.GetScriptingDefines();
         if (defines.Length > 0)
         {
             foreach (var define in defines)
             {
                 var icon = UM_Skin.GetDefaultIcon("hash_tag_icon.png");
                 SA_EditorGUILayout.SelectableLabel(new GUIContent(define, icon));
             }
         }
         else
         {
             EditorGUILayout.HelpBox("No additional scripting defines required.", MessageType.Info);
         }
     }
 }
 private static void UpdateSDKDefine(bool enabled, string define)
 {
     if (enabled)
     {
         if (!SA_EditorDefines.HasCompileDefine(define))
         {
             SA_EditorDefines.AddCompileDefine(define);
         }
         //TODO this has to be automatic and managed from AN
         AN_Preprocessor.ActicateJarResolver();
     }
     else
     {
         if (SA_EditorDefines.HasCompileDefine(define))
         {
             SA_EditorDefines.RemoveCompileDefine(define);
         }
     }
 }
        private static void UpdateAnalyticsLibState(bool enabled)
        {
            if (enabled)
            {
                if (!SA_EditorDefines.HasCompileDefine(AN_FIREBASE_ANALYTICS_DEFINE))
                {
                    SA_EditorDefines.AddCompileDefine(AN_FIREBASE_ANALYTICS_DEFINE);
                }

                AN_Preprocessor.ActicateJarResolver();
            }
            else
            {
                if (SA_EditorDefines.HasCompileDefine(AN_FIREBASE_ANALYTICS_DEFINE))
                {
                    SA_EditorDefines.RemoveCompileDefine(AN_FIREBASE_ANALYTICS_DEFINE);
                }
            }
        }
        private static void UpdateMessagingLibState(bool enabled)
        {
            if (enabled)
            {
                if (!SA_EditorDefines.HasCompileDefine(AN_FIREBASE_MESSAGING_DEFINE))
                {
                    SA_EditorDefines.AddCompileDefine(AN_FIREBASE_MESSAGING_DEFINE);
                }

                AN_Preprocessor.ActicateJarResolver();
            }
            else
            {
                if (SA_EditorDefines.HasCompileDefine(AN_FIREBASE_MESSAGING_DEFINE))
                {
                    SA_EditorDefines.RemoveCompileDefine(AN_FIREBASE_MESSAGING_DEFINE);
                }
            }
        }
Beispiel #13
0
        private static void UpdateLibState(bool fbLibFound)
        {
            if (fbLibFound)
            {
                if (!SA_EditorDefines.HasCompileDefine(SA_FB_INSTALLED_DEFINE))
                {
                    SA_EditorDefines.AddCompileDefine(SA_FB_INSTALLED_DEFINE);
                }

                //TODO need to figure out this dependency
                //it should not have AN ref. Unless it's shipped as part of UM
                AN_Preprocessor.ActicateJarResolver();
            }
            else
            {
                if (SA_EditorDefines.HasCompileDefine(SA_FB_INSTALLED_DEFINE))
                {
                    SA_EditorDefines.RemoveCompileDefine(SA_FB_INSTALLED_DEFINE);
                }
            }
        }