diff --git a/UnityProject/Assets/Prefabs/Version.prefab b/UnityProject/Assets/Prefabs/Version.prefab new file mode 100644 index 0000000..205594d --- /dev/null +++ b/UnityProject/Assets/Prefabs/Version.prefab @@ -0,0 +1,196 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4926884604496571692 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4926884604496571683} + - component: {fileID: 4926884604496571681} + - component: {fileID: 4926884604496571682} + m_Layer: 5 + m_Name: Version + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4926884604496571683 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926884604496571692} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4926884604698534042} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 100, y: 25} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4926884604496571681 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926884604496571692} + m_CullTransparentMesh: 0 +--- !u!114 &4926884604496571682 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926884604496571692} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'build: ' +--- !u!1 &4926884604698534022 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4926884604698534042} + - component: {fileID: 4926884604698534043} + - component: {fileID: 4926884604698534020} + - component: {fileID: 4926884604698534021} + - component: {fileID: 4926884604698534041} + m_Layer: 5 + m_Name: Version + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4926884604698534042 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926884604698534022} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 4926884604496571683} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!223 &4926884604698534043 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926884604698534022} + m_Enabled: 0 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &4926884604698534020 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926884604698534022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!114 &4926884604698534021 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926884604698534022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &4926884604698534041 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4926884604698534022} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3fb0c8b520900c84b8742f42b7c88519, type: 3} + m_Name: + m_EditorClassIdentifier: + versionCanvas: {fileID: 4926884604698534043} + versionText: {fileID: 4926884604496571682} + buildNumberFile: {fileID: 4900000, guid: ca4335683e9620440a905603b7105ce9, type: 3} diff --git a/UnityProject/Assets/Prefabs/Version.prefab.meta b/UnityProject/Assets/Prefabs/Version.prefab.meta new file mode 100644 index 0000000..121ed52 --- /dev/null +++ b/UnityProject/Assets/Prefabs/Version.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f634dccc6057931408dda8ac0f5a7292 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Resources.meta b/UnityProject/Assets/Resources.meta new file mode 100644 index 0000000..bc62aa2 --- /dev/null +++ b/UnityProject/Assets/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0421a42eda90ab24faab58b83f1b93da +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Resources/buildNumber.txt b/UnityProject/Assets/Resources/buildNumber.txt new file mode 100644 index 0000000..f138c86 --- /dev/null +++ b/UnityProject/Assets/Resources/buildNumber.txt @@ -0,0 +1 @@ +Undefined \ No newline at end of file diff --git a/UnityProject/Assets/Resources/buildNumber.txt.meta b/UnityProject/Assets/Resources/buildNumber.txt.meta new file mode 100644 index 0000000..2c7aeaf --- /dev/null +++ b/UnityProject/Assets/Resources/buildNumber.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ca4335683e9620440a905603b7105ce9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Scripts/Versioning.meta b/UnityProject/Assets/Scripts/Versioning.meta new file mode 100644 index 0000000..6a52458 --- /dev/null +++ b/UnityProject/Assets/Scripts/Versioning.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 598c80a130b35194ab38e382c0d00ada +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Scripts/Versioning/VersionToggleBehaviour.cs b/UnityProject/Assets/Scripts/Versioning/VersionToggleBehaviour.cs new file mode 100644 index 0000000..02484f4 --- /dev/null +++ b/UnityProject/Assets/Scripts/Versioning/VersionToggleBehaviour.cs @@ -0,0 +1,25 @@ +using System.IO; +using UnityEngine; +using UnityEngine.UI; + +public class VersionToggleBehaviour : MonoBehaviour +{ + #pragma warning disable 0649 + [SerializeField] private Canvas versionCanvas; + [SerializeField] private Text versionText; + [SerializeField] private TextAsset buildNumberFile; + #pragma warning restore 0649 + + void Start() + { + versionText.text = "Build: " + buildNumberFile.text; + } + + void Update() + { + if (Input.GetKeyDown(KeyCode.V)) + { + versionCanvas.enabled = !versionCanvas.enabled; + } + } +} diff --git a/UnityProject/Assets/Scripts/Versioning/VersionToggleBehaviour.cs.meta b/UnityProject/Assets/Scripts/Versioning/VersionToggleBehaviour.cs.meta new file mode 100644 index 0000000..ddd3233 --- /dev/null +++ b/UnityProject/Assets/Scripts/Versioning/VersionToggleBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3fb0c8b520900c84b8742f42b7c88519 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: