-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated the build updater code to have a ifdef for a deprecated build target. - Updated the asset generation to use the latest index style setup for build information & settings. Should hlep with warning messages in theory.
- Loading branch information
1 parent
69f7433
commit a10e1a2
Showing
123 changed files
with
2,680 additions
and
1,283 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
115 changes: 115 additions & 0 deletions
115
Code/Editor/Custom Inspectors/BuildInformationEditor.cs
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,115 @@ | ||
/* | ||
* Copyright (c) 2018-Present Carter Games | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace CarterGames.Assets.BuildVersions.Editor | ||
{ | ||
/// <summary> | ||
/// An editor override for the build information asset... | ||
/// </summary> | ||
[CustomEditor(typeof(BuildInformation))] | ||
public class BuildInformationEditor : UnityEditor.Editor | ||
{ | ||
/* ————————————————————————————————————————————————————————————————————————————————————————————————————————————— | ||
| Fields | ||
————————————————————————————————————————————————————————————————————————————————————————————————————————————— */ | ||
|
||
private SerializedProperty buildType; | ||
private SerializedProperty buildDate; | ||
private SerializedProperty buildNumber; | ||
|
||
/* ————————————————————————————————————————————————————————————————————————————————————————————————————————————— | ||
| Unity Methods | ||
————————————————————————————————————————————————————————————————————————————————————————————————————————————— */ | ||
|
||
private void OnEnable() | ||
{ | ||
buildType = serializedObject.FindProperty("buildType"); | ||
buildDate = serializedObject.FindProperty("buildDate"); | ||
buildNumber = serializedObject.FindProperty("buildNumber"); | ||
} | ||
|
||
|
||
public override void OnInspectorGUI() | ||
{ | ||
ShowLogo(); | ||
|
||
GUILayout.Space(2.5f); | ||
|
||
EditorGUILayout.BeginVertical("HelpBox"); | ||
|
||
EditorGUILayout.LabelField("Information", EditorStyles.boldLabel); | ||
ShowValues(); | ||
|
||
EditorGUILayout.EndVertical(); | ||
|
||
serializedObject.ApplyModifiedProperties(); | ||
serializedObject.Update(); | ||
} | ||
|
||
/* ————————————————————————————————————————————————————————————————————————————————————————————————————————————— | ||
| Methods | ||
————————————————————————————————————————————————————————————————————————————————————————————————————————————— */ | ||
|
||
/// <summary> | ||
/// Draws the logo for the asset... | ||
/// </summary> | ||
private static void ShowLogo() | ||
{ | ||
// Shows either the Logo if found, if not nothing will show here... | ||
if (UtilEditor.HasFile("BuildVersionsIcon")) | ||
{ | ||
GUILayout.Space(5f); | ||
|
||
EditorGUILayout.BeginHorizontal(); | ||
GUILayout.FlexibleSpace(); | ||
|
||
// Shows either the Logo if found, if not nothing will show here... | ||
if (GUILayout.Button(UtilEditor.Logo, GUIStyle.none, GUILayout.Width(50), GUILayout.Height(50))) | ||
GUI.FocusControl(null); | ||
|
||
GUILayout.FlexibleSpace(); | ||
EditorGUILayout.EndHorizontal(); | ||
} | ||
|
||
GUILayout.Space(5f); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Draws the property fields for the build info asset... | ||
/// </summary> | ||
private void ShowValues() | ||
{ | ||
EditorGUILayout.PropertyField(buildType); | ||
|
||
EditorGUI.indentLevel++; | ||
EditorGUILayout.PropertyField(buildDate); | ||
EditorGUI.indentLevel--; | ||
|
||
EditorGUILayout.PropertyField(buildNumber); | ||
} | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.