Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor Utility Tools Update #887

Merged
merged 19 commits into from
Sep 2, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ce34bf2
Updated Editor Prefs keys w/Applicaion names to generate unique keys …
StephenHodgson Aug 24, 2017
dc400cb
Moved SetIconsWindow and TextureScale into the proper folders
StephenHodgson Aug 24, 2017
6447dbb
Updated Capability window and Auto Configure window. Removed Redundan…
StephenHodgson Aug 24, 2017
ba038e4
removed non sharing specific capability changes
StephenHodgson Aug 25, 2017
7f622c8
Fixed path slashes not getting updated.
StephenHodgson Aug 25, 2017
0f67576
Moved Cross Platform folder into Utilities/Scripts
StephenHodgson Aug 25, 2017
150a131
Merge branch 'HTK-Master' into HTK-IconGenUpdate
StephenHodgson Aug 25, 2017
1ae13ec
Properly sets Editor Prefs
StephenHodgson Aug 26, 2017
27b3f6d
Added Editor Prefs Utilities and refactored.
StephenHodgson Aug 26, 2017
2d376f3
better capability handling.
StephenHodgson Aug 26, 2017
ca0a5a1
Removed build target switch and quality settings hack.
StephenHodgson Aug 26, 2017
496d101
just a bit of formatting and renaming regions.
StephenHodgson Aug 26, 2017
b59c80d
fix bug in finding msbuild.exe path for vs 2017. also determine wheth…
jamesashley1 Aug 30, 2017
d9ff8cd
Merge pull request #7 from jamesashley1/hTK-IconGenUpdate
StephenHodgson Aug 30, 2017
5a1b4f3
Simplified using references. Minor formatting.
StephenHodgson Aug 30, 2017
a7e31a5
Merge branch 'HTK-Master' into HTK-IconGenUpdate
StephenHodgson Aug 30, 2017
fad265b
Now opens exploerer with focus
StephenHodgson Aug 30, 2017
f4e97b8
removed missing folder meta files
StephenHodgson Aug 30, 2017
2e5b2b1
Fixed App launcher in Build Window. Light refactoring of private memb…
StephenHodgson Aug 30, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions Assets/HoloToolkit/BuildAndDeploy/Editor/BuildDeployPrefs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ namespace HoloToolkit.Unity
public static class BuildDeployPrefs
{
// Constants
private const string EditorPrefs_BuildDir = "BuildDeployWindow_BuildDir";
private const string EditorPrefs_BuildConfig = "BuildDeployWindow_BuildConfig";
private const string EditorPrefs_ForceRebuild = "BuildDeployWindow_ForceBuild";
private const string EditorPrefs_IncrementBuildVersion = "BuildDeployWindow_IncrementBuildVersion";
private const string EditorPrefs_MSBuildVer = "BuildDeployWindow_MSBuildVer";
private const string EditorPrefs_TargetIPs = "BuildDeployWindow_DestIPs";
private const string EditorPrefs_DeviceUser = "BuildDeployWindow_DeviceUser";
private const string EditorPrefs_DevicePwd = "BuildDeployWindow_DevicePwd";
private const string EditorPrefs_FullReinstall = "BuildDeployWindow_FullReinstall";
private const string EditorPrefs_BuildDir = "_BuildDeployWindow_BuildDir";
private const string EditorPrefs_BuildConfig = "_BuildDeployWindow_BuildConfig";
private const string EditorPrefs_ForceRebuild = "_BuildDeployWindow_ForceBuild";
private const string EditorPrefs_IncrementBuildVersion = "_BuildDeployWindow_IncrementBuildVersion";
private const string EditorPrefs_MSBuildVer = "_BuildDeployWindow_MSBuildVer";
private const string EditorPrefs_TargetIPs = "_BuildDeployWindow_DestIPs";
private const string EditorPrefs_DeviceUser = "_BuildDeployWindow_DeviceUser";
private const string EditorPrefs_DevicePwd = "_BuildDeployWindow_DevicePwd";
private const string EditorPrefs_FullReinstall = "_BuildDeployWindow_FullReinstall";

public static string BuildDirectory
{
get { return GetEditorPref(EditorPrefs_BuildDir, "WindowsStoreApp"); }
set { EditorPrefs.SetString(EditorPrefs_BuildDir, value); }
get { return GetEditorPref(EditorPrefs_BuildDir, "UWP"); }
set { GetEditorPref(EditorPrefs_BuildDir, value); }
}

public static string AbsoluteBuildDirectory
Expand All @@ -36,70 +36,70 @@ public static string AbsoluteBuildDirectory
public static string MsBuildVersion
{
get { return GetEditorPref(EditorPrefs_MSBuildVer, BuildDeployTools.DefaultMSBuildVersion); }
set { EditorPrefs.SetString(EditorPrefs_MSBuildVer, value); }
set { GetEditorPref(EditorPrefs_MSBuildVer, value); }
}

public static string BuildConfig
{
get { return GetEditorPref(EditorPrefs_BuildConfig, "Debug"); }
set { EditorPrefs.SetString(EditorPrefs_BuildConfig, value); }
set { GetEditorPref(EditorPrefs_BuildConfig, value); }
}

public static bool ForceRebuild
{
get { return GetEditorPref(EditorPrefs_ForceRebuild, false); }
set { EditorPrefs.SetBool(EditorPrefs_ForceRebuild, value); }
set { GetEditorPref(EditorPrefs_ForceRebuild, value); }
}

public static bool IncrementBuildVersion
{
get { return GetEditorPref(EditorPrefs_IncrementBuildVersion, true); }
set { EditorPrefs.SetBool(EditorPrefs_IncrementBuildVersion, value); }
set { GetEditorPref(EditorPrefs_IncrementBuildVersion, value); }
}

public static string TargetIPs
{
get { return GetEditorPref(EditorPrefs_TargetIPs, "127.0.0.1"); }
set { EditorPrefs.SetString(EditorPrefs_TargetIPs, value); }
set { GetEditorPref(EditorPrefs_TargetIPs, value); }
}

public static string DeviceUser
{
get { return GetEditorPref(EditorPrefs_DeviceUser, ""); }
set { EditorPrefs.SetString(EditorPrefs_DeviceUser, value); }
set { GetEditorPref(EditorPrefs_DeviceUser, value); }
}

public static string DevicePassword
{
get { return GetEditorPref(EditorPrefs_DevicePwd, ""); }
set { EditorPrefs.SetString(EditorPrefs_DevicePwd, value); }
set { GetEditorPref(EditorPrefs_DevicePwd, value); }
}

public static bool FullReinstall
{
get { return GetEditorPref(EditorPrefs_FullReinstall, true); }
set { EditorPrefs.SetBool(EditorPrefs_FullReinstall, value); }
set { GetEditorPref(EditorPrefs_FullReinstall, value); }
}

private static string GetEditorPref(string key, string defaultValue)
{
if (EditorPrefs.HasKey(key))
if (EditorPrefs.HasKey(Application.productName + key))
{
return EditorPrefs.GetString(key);
return EditorPrefs.GetString(Application.productName + key);
}

EditorPrefs.SetString(key, defaultValue);
EditorPrefs.SetString(Application.productName + key, defaultValue);
return defaultValue;
}

private static bool GetEditorPref(string key, bool defaultValue)
{
if (EditorPrefs.HasKey(key))
if (EditorPrefs.HasKey(Application.productName + key))
{
return EditorPrefs.GetBool(key);
return EditorPrefs.GetBool(Application.productName + key);
}

EditorPrefs.SetBool(key, defaultValue);
EditorPrefs.SetBool(Application.productName + key, defaultValue);
return defaultValue;
}
}
Expand Down
10 changes: 4 additions & 6 deletions Assets/HoloToolkit/BuildAndDeploy/Editor/BuildDeployWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,10 @@ private bool HoloLensUsbConnected
[MenuItem("HoloToolkit/Build Window", false, 0)]
public static void OpenWindow()
{
var window = GetWindow<BuildDeployWindow>("Build Window");

if (window != null)
{
window.Show();
}
// Dock it next to the Scene View.
var window = GetWindow<BuildDeployWindow>(typeof(SceneView));
window.titleContent = new GUIContent("Build Window");
window.Show();
}

private void OnEnable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace HoloToolkit.Unity
{
public static class RoomMeshExporter
{
private const string ExportDirectoryKey = "ExportDirectory";
private const string ExportDirectoryKey = "_ExportDirectory";
private const string ExportDirectoryDefault = "MeshExport";
private const string ExportDialogErrorTitle = "Export Error";
private const string WavefrontFileExtension = ".obj";
Expand All @@ -27,7 +27,7 @@ public static string ExportDirectory
value = ExportDirectoryDefault;
}

EditorPrefs.SetString(ExportDirectoryKey, value);
EditorPrefs.SetString(Application.productName + ExportDirectoryKey, value);
}
}

Expand Down
9 changes: 0 additions & 9 deletions Assets/HoloToolkit/Utilities/Editor.meta

This file was deleted.

Loading