Example #1
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     if (GUI.changed)
     {
         EZKeystoreInitializer.SetKeystore(target as EZKeystoreObject);
         EditorUtility.SetDirty(target);
     }
 }
 protected override void OnFocus()
 {
     base.OnFocus();
     ezKeystore = EZScriptableObject.Load <EZKeystoreObject>(EZKeystoreObject.AssetName, false);
     if (ezKeystore == null)
     {
         ezKeystore = EZKeystoreInitializer.CreateKeystore();
     }
     so_EZKeystore    = new SerializedObject(ezKeystore);
     keystoreFilePath = so_EZKeystore.FindProperty("keystoreFilePath");
     keystorePassword = so_EZKeystore.FindProperty("keystorePassword");
     keyAliasName     = so_EZKeystore.FindProperty("keyAliasName");
     keyAliasPassword = so_EZKeystore.FindProperty("keyAliasPassword");
 }
 protected override void OnGUI()
 {
     base.OnGUI();
     so_EZKeystore.Update();
     if (GUILayout.Button("Load"))
     {
         EZKeystoreInitializer.CreateKeystore();
     }
     EditorGUILayout.PropertyField(keystoreFilePath);
     EditorGUILayout.PropertyField(keystorePassword);
     EditorGUILayout.PropertyField(keyAliasName);
     EditorGUILayout.PropertyField(keyAliasPassword);
     so_EZKeystore.ApplyModifiedProperties();
     if (GUI.changed)
     {
         EZKeystoreInitializer.SetKeystore(ezKeystore);
         EditorUtility.SetDirty(ezKeystore);
     }
 }