Exemple #1
0
        internal static void    SetSendStats(object sendStats)
        {
            if ((bool)sendStats == false)
            {
                if (EditorUtility.DisplayDialog(Constants.PackageTitle, "For those who might want to know why I send stats.\nI need some info about Unity Editor usage, especially because Unity does not provide them.\nIn order to keep supporting legacy versions, unused tools or platforms such as Unity 4, Mac or else.\n\nDo you confirm not sending stats?", "Yes", "No") == false)
                {
                    return;
                }

                HQ.SendStats(false);
            }

            NGEditorPrefs.SetBool(HQ.AllowSendStatsKeyPref, (bool)sendStats);
        }
Exemple #2
0
        protected virtual void  OnGUI()
        {
            if (UnityAssemblyVerifier.cachedMissing == null)
            {
                if (UnityAssemblyVerifier.missing.Count > 0)
                {
                    StringBuilder buffer = Utility.GetBuffer();

                    for (int i = 0; i < UnityAssemblyVerifier.missing.Count; i++)
                    {
                        if (buffer.Length > 0)
                        {
                            buffer.AppendLine();
                        }
                        buffer.AppendLine(UnityAssemblyVerifier.missing[i].Key);
                        buffer.AppendLine(UnityAssemblyVerifier.missing[i].Value);
                    }

                    buffer.Length -= Environment.NewLine.Length;

                    UnityAssemblyVerifier.cachedMissing = Utility.ReturnBuffer(buffer);
                }
                else
                {
                    UnityAssemblyVerifier.cachedMissing = string.Empty;
                }
            }

            EditorGUILayout.HelpBox(Constants.PackageTitle + " has detected a change in Unity code. Please contact the author.", MessageType.Error);

            if (GUILayout.Button("Contact the author") == true)
            {
                ContactFormWizard.Open(ContactFormWizard.Subject.BugReport, "The following metadata are missing :" + Environment.NewLine + UnityAssemblyVerifier.cachedMissing);
            }

            if (GUILayout.Button("Don't show the message again") == true)
            {
                NGEditorPrefs.SetBool(UnityAssemblyVerifier.SkipWarningPrefKey, true);
                this.Close();
            }

            GUILayout.Label("The following metadata are missing :");
            EditorGUILayout.TextArea(UnityAssemblyVerifier.cachedMissing);
        }
Exemple #3
0
 public override void    DirectSave(object instance, Type type, string path)
 {
     NGEditorPrefs.SetBool(path, (Boolean)instance);
 }
Exemple #4
0
 protected virtual void  OnDisable()
 {
     NGEditorPrefs.SetBool(DontNotifyNewUpdateKeyPref, !this.notifyNewUpdate);
 }