99
1010namespace HoloToolkit . Unity
1111{
12-
1312 public static class BuildDeployPrefs
1413 {
1514 // Constants
@@ -28,45 +27,54 @@ public static string BuildDirectory
2827 get { return GetEditorPref ( EditorPrefs_BuildDir , "WindowsStoreApp" ) ; }
2928 set { EditorPrefs . SetString ( EditorPrefs_BuildDir , value ) ; }
3029 }
30+
3131 public static string AbsoluteBuildDirectory
3232 {
3333 get { return Path . GetFullPath ( Path . Combine ( Path . Combine ( Application . dataPath , ".." ) , BuildDirectory ) ) ; }
3434 }
35+
3536 public static string MsBuildVersion
3637 {
3738 get { return GetEditorPref ( EditorPrefs_MSBuildVer , BuildDeployTools . DefaultMSBuildVersion ) ; }
3839 set { EditorPrefs . SetString ( EditorPrefs_MSBuildVer , value ) ; }
3940 }
41+
4042 public static string BuildConfig
4143 {
4244 get { return GetEditorPref ( EditorPrefs_BuildConfig , "Debug" ) ; }
4345 set { EditorPrefs . SetString ( EditorPrefs_BuildConfig , value ) ; }
4446 }
47+
4548 public static bool ForceRebuild
4649 {
4750 get { return GetEditorPref ( EditorPrefs_ForceRebuild , false ) ; }
4851 set { EditorPrefs . SetBool ( EditorPrefs_ForceRebuild , value ) ; }
4952 }
53+
5054 public static bool IncrementBuildVersion
5155 {
5256 get { return GetEditorPref ( EditorPrefs_IncrementBuildVersion , true ) ; }
5357 set { EditorPrefs . SetBool ( EditorPrefs_IncrementBuildVersion , value ) ; }
5458 }
59+
5560 public static string TargetIPs
5661 {
5762 get { return GetEditorPref ( EditorPrefs_TargetIPs , "127.0.0.1" ) ; }
5863 set { EditorPrefs . SetString ( EditorPrefs_TargetIPs , value ) ; }
5964 }
65+
6066 public static string DeviceUser
6167 {
6268 get { return GetEditorPref ( EditorPrefs_DeviceUser , "" ) ; }
6369 set { EditorPrefs . SetString ( EditorPrefs_DeviceUser , value ) ; }
6470 }
71+
6572 public static string DevicePassword
6673 {
6774 get { return GetEditorPref ( EditorPrefs_DevicePwd , "" ) ; }
6875 set { EditorPrefs . SetString ( EditorPrefs_DevicePwd , value ) ; }
6976 }
77+
7078 public static bool FullReinstall
7179 {
7280 get { return GetEditorPref ( EditorPrefs_FullReinstall , true ) ; }
@@ -79,11 +87,9 @@ private static string GetEditorPref(string key, string defaultValue)
7987 {
8088 return EditorPrefs . GetString ( key ) ;
8189 }
82- else
83- {
84- EditorPrefs . SetString ( key , defaultValue ) ;
85- return defaultValue ;
86- }
90+
91+ EditorPrefs . SetString ( key , defaultValue ) ;
92+ return defaultValue ;
8793 }
8894
8995 private static bool GetEditorPref ( string key , bool defaultValue )
@@ -92,11 +98,9 @@ private static bool GetEditorPref(string key, bool defaultValue)
9298 {
9399 return EditorPrefs . GetBool ( key ) ;
94100 }
95- else
96- {
97- EditorPrefs . SetBool ( key , defaultValue ) ;
98- return defaultValue ;
99- }
101+
102+ EditorPrefs . SetBool ( key , defaultValue ) ;
103+ return defaultValue ;
100104 }
101105 }
102106}
0 commit comments