-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev/build window improvements (#853)
# XRTK - Mixed Reality Toolkit Pull Request ## Overview <!-- Please provide a clear and concise description of the pull request. --> misc build window updates.
- Loading branch information
1 parent
d224a36
commit 1caa64f
Showing
5 changed files
with
70 additions
and
46 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
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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright (c) XRTK. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using UnityEditor; | ||
|
||
namespace XRTK.Editor.BuildPipeline | ||
{ | ||
[CustomEditor(typeof(BuildInfo), true)] | ||
public class BuildInfoInspector : UnityEditor.Editor | ||
{ | ||
private SerializedProperty autoIncrement; | ||
private SerializedProperty bundleIdentifier; | ||
private SerializedProperty install; | ||
|
||
private BuildInfo buildInfo; | ||
|
||
protected void OnEnable() | ||
{ | ||
autoIncrement = serializedObject.FindProperty(nameof(autoIncrement)); | ||
bundleIdentifier = serializedObject.FindProperty(nameof(bundleIdentifier)); | ||
install = serializedObject.FindProperty(nameof(install)); | ||
|
||
buildInfo = (BuildInfo)target; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void OnInspectorGUI() | ||
{ | ||
serializedObject.Update(); | ||
|
||
EditorGUI.BeginChangeCheck(); | ||
EditorGUILayout.PropertyField(bundleIdentifier); | ||
|
||
if (EditorGUI.EndChangeCheck()) | ||
{ | ||
var buildTargetGroup = UnityEditor.BuildPipeline.GetBuildTargetGroup(buildInfo.BuildTarget); | ||
PlayerSettings.SetApplicationIdentifier(buildTargetGroup, bundleIdentifier.stringValue); | ||
} | ||
|
||
EditorGUILayout.PropertyField(autoIncrement); | ||
EditorGUILayout.PropertyField(install); | ||
|
||
serializedObject.ApplyModifiedProperties(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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