-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
535c6bc
commit 5cb890c
Showing
11 changed files
with
301 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
using UnityEngine; | ||
|
||
[CreateAssetMenu(fileName = "AndroidKeyStore", menuName = "JenkinsBuild/Creat AndroidKeyStore", order = 1)] | ||
public class AndroidKeyStore : ScriptableObject | ||
namespace JenkinsBuild | ||
{ | ||
public string KeystoreName; | ||
public string KeystorePassword; | ||
public string AliasName; | ||
public string AliasPassword; | ||
} | ||
[CreateAssetMenu(fileName = "AndroidKeyStore", menuName = "JenkinsBuild/Creat AndroidKeyStore", order = 1)] | ||
public class AndroidKeyStore : ScriptableObject | ||
{ | ||
public string KeystoreName; | ||
public string KeystorePassword; | ||
public string AliasName; | ||
public string AliasPassword; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,76 @@ | ||
using System.IO; | ||
using UnityEditor; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
[CustomEditor(typeof(AndroidKeyStore))] | ||
public class AndroidKeyStoreEditor : Editor | ||
namespace JenkinsBuild | ||
{ | ||
private float labelWidth = 125f; | ||
private AndroidKeyStore m_Target; | ||
|
||
private void OnEnable() | ||
[CustomEditor(typeof(AndroidKeyStore))] | ||
public class AndroidKeyStoreEditor : Editor | ||
{ | ||
m_Target = (AndroidKeyStore)target; | ||
} | ||
private float labelWidth = 125f; | ||
private AndroidKeyStore m_Target; | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
SetKeyStorePath(); | ||
SetKeyStorePassword(); | ||
SetAliasName(); | ||
SetAliasPassword(); | ||
SaveAsset(); | ||
} | ||
private void OnEnable() | ||
{ | ||
m_Target = (AndroidKeyStore)target; | ||
} | ||
|
||
private void SaveAsset() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Save")) | ||
public override void OnInspectorGUI() | ||
{ | ||
EditorUtility.SetDirty(m_Target); | ||
AssetDatabase.SaveAssets(); | ||
AssetDatabase.Refresh(); | ||
SetKeyStorePath(); | ||
SetKeyStorePassword(); | ||
SetAliasName(); | ||
SetAliasPassword(); | ||
SaveAsset(); | ||
} | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
private void SetAliasPassword() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Label("Alias Password:", GUILayout.Width(labelWidth)); | ||
m_Target.AliasPassword = GUILayout.TextField(m_Target.AliasPassword); | ||
GUILayout.EndHorizontal(); | ||
} | ||
private void SaveAsset() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Save")) | ||
{ | ||
EditorUtility.SetDirty(m_Target); | ||
AssetDatabase.SaveAssets(); | ||
AssetDatabase.Refresh(); | ||
} | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
private void SetAliasName() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Label("Alias Name:", GUILayout.Width(labelWidth)); | ||
m_Target.AliasName = GUILayout.TextField(m_Target.AliasName); | ||
GUILayout.EndHorizontal(); | ||
} | ||
private void SetAliasPassword() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Label("Alias Password:", GUILayout.Width(labelWidth)); | ||
m_Target.AliasPassword = GUILayout.TextField(m_Target.AliasPassword); | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
private void SetKeyStorePassword() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Label("Keystore Password:", GUILayout.Width(labelWidth)); | ||
m_Target.KeystorePassword = GUILayout.TextField(m_Target.KeystorePassword); | ||
GUILayout.EndHorizontal(); | ||
} | ||
private void SetAliasName() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Label("Alias Name:", GUILayout.Width(labelWidth)); | ||
m_Target.AliasName = GUILayout.TextField(m_Target.AliasName); | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
private void SetKeyStorePath() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Select keystore", GUILayout.Width(labelWidth))) | ||
m_Target.KeystoreName = EditorUtility.OpenFilePanel("Select Keystore", Application.streamingAssetsPath, "keystore"); | ||
private void SetKeyStorePassword() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Label("Keystore Password:", GUILayout.Width(labelWidth)); | ||
m_Target.KeystorePassword = GUILayout.TextField(m_Target.KeystorePassword); | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
GUILayout.EndHorizontal(); | ||
private void SetKeyStorePath() | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Select keystore", GUILayout.Width(labelWidth))) | ||
m_Target.KeystoreName = EditorUtility.OpenFilePanel("Select Keystore", Application.streamingAssetsPath, "keystore"); | ||
|
||
GUILayout.EndHorizontal(); | ||
|
||
GUILayout.BeginHorizontal(); | ||
GUILayout.Label("Path:", GUILayout.Width(labelWidth)); | ||
GUILayout.Label(m_Target.KeystoreName); | ||
GUILayout.EndHorizontal(); | ||
GUILayout.BeginHorizontal(); | ||
GUILayout.Label("Path:", GUILayout.Width(labelWidth)); | ||
GUILayout.Label(m_Target.KeystoreName); | ||
GUILayout.EndHorizontal(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.