This commit is contained in:
2024-09-20 20:30:10 +02:00
commit 4fabf1a6fd
29169 changed files with 1706941 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a11be56b627f5034bbca389c76bd3964
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 74a5091d8707f334b9a5c31ef71a64ba
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: Perfect DOS VGA 437
fontNames:
- Perfect DOS VGA 437
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 2
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3774a3e29f7c59445ba79c15769126fd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,196 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1153602445894428
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224711363741255626}
- component: {fileID: 223912878945851142}
- component: {fileID: 114908889885781782}
- component: {fileID: 114649910605725082}
- component: {fileID: 114530362809716058}
m_Layer: 5
m_Name: DebugUICanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224711363741255626
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1153602445894428}
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_ConstrainProportionsScale: 0
m_Children: []
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 &223912878945851142
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1153602445894428}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 1
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 32767
m_TargetDisplay: 0
--- !u!114 &114908889885781782
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1153602445894428}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, 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
m_PresetInfoIsWorld: 0
--- !u!114 &114649910605725082
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1153602445894428}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &114530362809716058
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1153602445894428}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76db615e524a19c4990482d75a475543, type: 3}
m_Name:
m_EditorClassIdentifier:
panelPrefab: {fileID: 224481716535368988, guid: daa46a58178a6ad41ae1ddc2dc7f856d, type: 3}
prefabs:
- type: UnityEngine.Rendering.DebugUI+Value, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224720214277421396, guid: dc0f88987826e6e48b1fe9c7c2b53a53, type: 3}
- type: UnityEngine.Rendering.DebugUI+BoolField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224131888606727344, guid: ce347ad101f41ee4ab5c3fbc0ea447db, type: 3}
- type: UnityEngine.Rendering.DebugUI+IntField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224720214277421396, guid: ae00bb75e0cd5b04b8fe7fb4ab662629, type: 3}
- type: UnityEngine.Rendering.DebugUI+UIntField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224720214277421396, guid: f22bcc84a5f4a1944b075a2c4ac71493, type: 3}
- type: UnityEngine.Rendering.DebugUI+FloatField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224720214277421396, guid: d8c744701b43c864b88e7f8144e19bc5, type: 3}
- type: UnityEngine.Rendering.DebugUI+EnumField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224224135738715566, guid: 988db55689193434fb0b3b89538f978f, type: 3}
- type: UnityEngine.Rendering.DebugUI+Button, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224438017010656346, guid: f6ce33b91f6ffe54cadacbf4bb112440, type: 3}
- type: UnityEngine.Rendering.DebugUI+Foldout, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224053494956566916, guid: 1c87ab2ce8b8b304d98fbe9a734b1f74, type: 3}
- type: UnityEngine.Rendering.DebugUI+ColorField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224636372931965878, guid: 77c185820dd1a464eac89cae3abccddf, type: 3}
- type: UnityEngine.Rendering.DebugUI+Vector2Field, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224169904409585018, guid: 326f7c58aed965d41bf7805a782d1e44, type: 3}
- type: UnityEngine.Rendering.DebugUI+Vector3Field, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224119945032119512, guid: 94afea5f242d72547979595ba963f335, type: 3}
- type: UnityEngine.Rendering.DebugUI+Vector4Field, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224325631027038092, guid: d47f009476100f545971a81ede14c750, type: 3}
- type: UnityEngine.Rendering.DebugUI+VBox, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224489511352681190, guid: ca3e294656861a64b8aeeb9f916da0a9, type: 3}
- type: UnityEngine.Rendering.DebugUI+HBox, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224719784157228276, guid: f7f5e36797cf0c1408561665c67b179b, type: 3}
- type: UnityEngine.Rendering.DebugUI+Container, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224284813447651300, guid: 38a07789c9e87004dad98c2909f58369, type: 3}
- type: UnityEngine.Rendering.DebugUI+BitField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 5833802642077810669, guid: 7c78b588b2e1f7c4a86ca4a985cf6e4a, type: 3}
- type: UnityEngine.Rendering.DebugUI+HistoryBoolField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 108402283379224504, guid: 5088d0220f0c4df439cf06c5c270eacb, type: 3}
- type: UnityEngine.Rendering.DebugUI+HistoryEnumField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 8535926254376877601, guid: b2da6b27df236b144b3516ed8e7d36ac, type: 3}
- type: UnityEngine.Rendering.DebugUI+Table, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224284813447651300, guid: 38a07789c9e87004dad98c2909f58369, type: 3}
- type: UnityEngine.Rendering.DebugUI+Table+Row, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224053494956566916, guid: 2d019437ff89b8d44949727731cd9357, type: 3}
- type: UnityEngine.Rendering.DebugUI+MessageBox, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224053494956566916, guid: 10a25524b0986f9488b430e2829bbbe8, type: 3}
- type: UnityEngine.Rendering.DebugUI+ProgressBarValue, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224720214277421396, guid: d3770aaa3bbd8384aabab9ddd383e21e, type: 3}
- type: UnityEngine.Rendering.DebugUI+ValueTuple, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224720214277421396, guid: a2148203dd960814ca5db0c293ceda35, type: 3}
- type: UnityEngine.Rendering.DebugUI+ObjectField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224720214277421396, guid: a87cfaef648f17c41b568e842e068c51, type: 3}
- type: UnityEngine.Rendering.DebugUI+ObjectListField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 224224135738715566, guid: ad83bc56407925d44a77a5bd01cd6783, type: 3}
- type: UnityEngine.Rendering.DebugUI+ObjectPopupField, Unity.RenderPipelines.Core.Runtime,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
prefab: {fileID: 4224455051203994714, guid: 48fb043c850cadc4a883b53785e14c6e, type: 3}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cf6cbdd672089a84796e55a21fed1cbe
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,237 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1388241697787146
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224499400523491650}
- component: {fileID: 222203031975944290}
- component: {fileID: 114530022413994304}
- component: {fileID: 114399612179518328}
- component: {fileID: 114307594989265542}
m_Layer: 5
m_Name: DebugUI Persistent Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224499400523491650
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1388241697787146}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 224556897823040040}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -5, y: -5}
m_SizeDelta: {x: 400, y: 0}
m_Pivot: {x: 1, y: 1}
--- !u!222 &222203031975944290
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1388241697787146}
m_CullTransparentMesh: 0
--- !u!114 &114530022413994304
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1388241697787146}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.1, g: 0.1, b: 0.1, a: 0.8509804}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 127279d577f25ac4ea17dae3782e5074, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &114399612179518328
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1388241697787146}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 5
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &114307594989265542
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1388241697787146}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 0
m_VerticalFit: 1
--- !u!1 &1822588063230394
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224556897823040040}
- component: {fileID: 223125086719629416}
- component: {fileID: 114876729554496680}
- component: {fileID: 114213191034542798}
- component: {fileID: 114605181728370468}
m_Layer: 5
m_Name: DebugUIPersistentCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224556897823040040
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1822588063230394}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 224499400523491650}
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 &223125086719629416
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1822588063230394}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 1
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 32766
m_TargetDisplay: 0
--- !u!114 &114876729554496680
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1822588063230394}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, 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
m_PresetInfoIsWorld: 0
--- !u!114 &114213191034542798
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1822588063230394}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &114605181728370468
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1822588063230394}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 87177621604658d4e893f55be7cfae4a, type: 3}
m_Name:
m_EditorClassIdentifier:
panel: {fileID: 224499400523491650}
valuePrefab: {fileID: 224720214277421396, guid: 8778e6b26b51c6a4999b94d7cacd8b5d, type: 3}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f6b1a0fe75d5009449cf55ae76220e2b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9383aa19796d6e84e8031655b9ac912f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,174 @@
using System.Collections.Generic;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for Bitfield widget. Require the enum to have a None field set to 0 in its values.
/// </summary>
public class DebugUIHandlerBitField : DebugUIHandlerWidget
{
/// <summary>Name of the widget.</summary>
public Text nameLabel;
/// <summary>Value toggle.</summary>
public UIFoldout valueToggle;
/// <summary>Toggles for the bitfield.</summary>
public List<DebugUIHandlerIndirectToggle> toggles;
DebugUI.BitField m_Field;
DebugUIHandlerContainer m_Container;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.BitField>();
m_Container = GetComponent<DebugUIHandlerContainer>();
nameLabel.text = m_Field.displayName;
int toggleIndex = 0;
foreach (var enumName in m_Field.enumNames)
{
if (toggleIndex >= toggles.Count)
continue;
var toggle = toggles[toggleIndex];
toggle.getter = GetValue;
toggle.setter = SetValue;
toggle.nextUIHandler = toggleIndex < (m_Field.enumNames.Length - 1) ? toggles[toggleIndex + 1] : null;
toggle.previousUIHandler = toggleIndex > 0 ? toggles[toggleIndex - 1] : null;
toggle.parentUIHandler = this;
toggle.index = toggleIndex;
toggle.nameLabel.text = enumName.text;
toggle.Init();
toggleIndex++;
}
// Destroy the remaining toggles outside of the range of the displayed enum.
for (; toggleIndex < toggles.Count; ++toggleIndex)
{
CoreUtils.Destroy(toggles[toggleIndex].gameObject);
toggles[toggleIndex] = null;
}
}
bool GetValue(int index)
{
if (index == 0)
{
// None can't be selected
return false;
}
else
{
// We need to remove 1 to the index because there is the None element on top of
// the enum and it doesn't count in the bit field because it's value is 0
index--;
int intValue = System.Convert.ToInt32(m_Field.GetValue());
return (intValue & (1 << index)) != 0;
}
}
void SetValue(int index, bool value)
{
if (index == 0)
{
// None was selected so we reset all the bits to false
m_Field.SetValue(System.Enum.ToObject(m_Field.enumType, 0));
foreach (var toggle in toggles)
{
if (toggle?.getter != null)
toggle.UpdateValueLabel();
}
}
else
{
int intValue = System.Convert.ToInt32(m_Field.GetValue());
if (value)
intValue |= m_Field.enumValues[index];
else
intValue &= ~m_Field.enumValues[index];
m_Field.SetValue(System.Enum.ToObject(m_Field.enumType, intValue));
}
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (fromNext || valueToggle.isOn == false)
{
nameLabel.color = colorSelected;
}
else if (valueToggle.isOn)
{
if (m_Container.IsDirectChild(previous))
{
nameLabel.color = colorSelected;
}
else
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
}
}
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
valueToggle.isOn = true;
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
valueToggle.isOn = false;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
valueToggle.isOn = !valueToggle.isOn;
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public override DebugUIHandlerWidget Next()
{
if (!valueToggle.isOn || m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 662c81b0e51f80a4797c39bbd7116f9a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,50 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for Button widget.
/// </summary>
public class DebugUIHandlerButton : DebugUIHandlerWidget
{
/// <summary>Name of the widget.</summary>
public Text nameLabel;
DebugUI.Button m_Field;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.Button>();
nameLabel.text = m_Field.displayName;
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>State of the widget.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
if (m_Field.action != null)
m_Field.action();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8bff080b4e3bae64c80b54402ced6cc6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,345 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine.Rendering;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// Debug UI Prefab bundle.
/// </summary>
[Serializable]
public class DebugUIPrefabBundle
{
/// <summary>type of the widget.</summary>
public string type;
/// <summary>Prefab for the widget.</summary>
public RectTransform prefab;
}
/// <summary>
/// DebugUIHandler for canvas widget.
/// </summary>
public class DebugUIHandlerCanvas : MonoBehaviour
{
int m_DebugTreeState;
Dictionary<Type, Transform> m_PrefabsMap;
/// <summary>Panel prefab.</summary>
public Transform panelPrefab;
/// <summary>List of prefabs.</summary>
public List<DebugUIPrefabBundle> prefabs;
List<DebugUIHandlerPanel> m_UIPanels;
int m_SelectedPanel;
DebugUIHandlerWidget m_SelectedWidget;
string m_CurrentQueryPath;
void OnEnable()
{
if (prefabs == null)
prefabs = new List<DebugUIPrefabBundle>();
if (m_PrefabsMap == null)
m_PrefabsMap = new Dictionary<Type, Transform>();
if (m_UIPanels == null)
m_UIPanels = new List<DebugUIHandlerPanel>();
DebugManager.instance.RegisterRootCanvas(this);
}
void Update()
{
int state = DebugManager.instance.GetState();
if (m_DebugTreeState != state)
{
ResetAllHierarchy();
}
HandleInput();
// Update scroll position in the panel
if (m_UIPanels != null && m_SelectedPanel < m_UIPanels.Count && m_UIPanels[m_SelectedPanel] != null)
m_UIPanels[m_SelectedPanel].UpdateScroll();
}
internal void RequestHierarchyReset()
{
m_DebugTreeState = -1;
}
void ResetAllHierarchy()
{
foreach (Transform t in transform)
CoreUtils.Destroy(t.gameObject);
Rebuild();
}
void Rebuild()
{
// Check prefab associations
m_PrefabsMap.Clear();
foreach (var bundle in prefabs)
{
var type = Type.GetType(bundle.type);
if (type != null && bundle.prefab != null)
m_PrefabsMap.Add(type, bundle.prefab);
}
m_UIPanels.Clear();
m_DebugTreeState = DebugManager.instance.GetState();
var panels = DebugManager.instance.panels;
#if UNITY_ANDROID || UNITY_IPHONE
// Mobile device safe area
Rect parentRect = GetComponentInParent<RectTransform>().rect;
float parentWidth = Math.Min(parentRect.width, parentRect.height);
float scaleRatio = parentWidth / Math.Min(Screen.height, Screen.width);
Rect safeAreaRect = Screen.safeArea;
Vector2 margin = new Vector2(5, 5);
var safeAreaOffsetLeft = safeAreaRect.xMin * scaleRatio;
var safeAreaOffsetTop = -safeAreaRect.yMin * scaleRatio;
Vector2 safeAreaOffset = new Vector2(safeAreaOffsetLeft, safeAreaOffsetTop) + margin;
#endif
DebugUIHandlerWidget selectedWidget = null;
foreach (var panel in panels)
{
if (panel.isEditorOnly || panel.children.Count(x => !x.isEditorOnly && !x.isHidden) == 0)
continue;
var go = Instantiate(panelPrefab, transform, false).gameObject;
go.name = panel.displayName;
#if UNITY_ANDROID || UNITY_IPHONE
RectTransform rectTransform = go.GetComponent<RectTransform>();
rectTransform.anchoredPosition = safeAreaOffset;
rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, safeAreaRect.height * scaleRatio + 2 * safeAreaOffsetTop);
#endif
var uiPanel = go.GetComponent<DebugUIHandlerPanel>();
uiPanel.SetPanel(panel);
uiPanel.Canvas = this;
m_UIPanels.Add(uiPanel);
var container = go.GetComponent<DebugUIHandlerContainer>();
DebugUIHandlerWidget selected = null;
Traverse(panel, container.contentHolder, null, ref selected);
if (selected != null && selected.GetWidget().queryPath.Contains(panel.queryPath))
{
selectedWidget = selected;
}
}
ActivatePanel(m_SelectedPanel, selectedWidget);
}
void Traverse(DebugUI.IContainer container, Transform parentTransform, DebugUIHandlerWidget parentUIHandler, ref DebugUIHandlerWidget selectedHandler)
{
DebugUIHandlerWidget previousUIHandler = null;
for (int i = 0; i < container.children.Count; i++)
{
var child = container.children[i];
if (child.isEditorOnly || child.isHidden)
continue;
Transform prefab;
if (!m_PrefabsMap.TryGetValue(child.GetType(), out prefab))
{
Debug.LogWarning("DebugUI widget doesn't have a prefab: " + child.GetType());
continue;
}
var go = Instantiate(prefab, parentTransform, false).gameObject;
go.name = child.displayName;
var uiHandler = go.GetComponent<DebugUIHandlerWidget>();
if (uiHandler == null)
{
Debug.LogWarning("DebugUI prefab is missing a DebugUIHandler for: " + child.GetType());
continue;
}
if (!string.IsNullOrEmpty(m_CurrentQueryPath) && child.queryPath.Equals(m_CurrentQueryPath))
{
selectedHandler = uiHandler;
}
if (previousUIHandler != null) previousUIHandler.nextUIHandler = uiHandler;
uiHandler.previousUIHandler = previousUIHandler;
previousUIHandler = uiHandler;
uiHandler.parentUIHandler = parentUIHandler;
uiHandler.SetWidget(child);
var childContainer = go.GetComponent<DebugUIHandlerContainer>();
if (childContainer != null && child is DebugUI.IContainer childAsContainer)
Traverse(childAsContainer, childContainer.contentHolder, uiHandler, ref selectedHandler);
}
}
DebugUIHandlerWidget GetWidgetFromPath(string queryPath)
{
if (string.IsNullOrEmpty(queryPath))
return null;
var panel = m_UIPanels[m_SelectedPanel];
return panel
.GetComponentsInChildren<DebugUIHandlerWidget>()
.FirstOrDefault(w => w.GetWidget().queryPath == queryPath);
}
void ActivatePanel(int index, DebugUIHandlerWidget selectedWidget = null)
{
if (m_UIPanels.Count == 0)
return;
if (index >= m_UIPanels.Count)
index = m_UIPanels.Count - 1;
m_UIPanels.ForEach(p => p.gameObject.SetActive(false));
m_UIPanels[index].gameObject.SetActive(true);
m_SelectedPanel = index;
if (selectedWidget == null)
selectedWidget = m_UIPanels[index].GetFirstItem();
ChangeSelection(selectedWidget, true);
}
internal void ChangeSelection(DebugUIHandlerWidget widget, bool fromNext)
{
if (widget == null)
return;
if (m_SelectedWidget != null)
m_SelectedWidget.OnDeselection();
var prev = m_SelectedWidget;
m_SelectedWidget = widget;
SetScrollTarget(widget);
if (!m_SelectedWidget.OnSelection(fromNext, prev))
{
if (fromNext)
SelectNextItem();
else
SelectPreviousItem();
}
else
{
if (m_SelectedWidget == null || m_SelectedWidget.GetWidget() == null)
m_CurrentQueryPath = string.Empty;
else
m_CurrentQueryPath = m_SelectedWidget.GetWidget().queryPath;
}
}
internal void SelectPreviousItem()
{
if (m_SelectedWidget == null)
return;
var newSelection = m_SelectedWidget.Previous();
if (newSelection != null)
ChangeSelection(newSelection, false);
}
internal void SelectNextPanel()
{
int index = m_SelectedPanel + 1;
if (index >= m_UIPanels.Count)
index = 0;
index = Mathf.Clamp(index, 0, m_UIPanels.Count - 1);
ActivatePanel(index);
}
internal void SelectPreviousPanel()
{
int index = m_SelectedPanel - 1;
if (index < 0)
index = m_UIPanels.Count - 1;
index = Mathf.Clamp(index, 0, m_UIPanels.Count - 1);
ActivatePanel(index);
}
internal void SelectNextItem()
{
if (m_SelectedWidget == null)
return;
var newSelection = m_SelectedWidget.Next();
if (newSelection != null)
ChangeSelection(newSelection, true);
}
void ChangeSelectionValue(float multiplier)
{
if (m_SelectedWidget == null)
return;
bool fast = DebugManager.instance.GetAction(DebugAction.Multiplier) != 0f;
if (multiplier < 0f)
m_SelectedWidget.OnDecrement(fast);
else
m_SelectedWidget.OnIncrement(fast);
}
void ActivateSelection()
{
if (m_SelectedWidget == null)
return;
m_SelectedWidget.OnAction();
}
void HandleInput()
{
if (DebugManager.instance.GetAction(DebugAction.PreviousDebugPanel) != 0f)
{
SelectPreviousPanel();
}
if (DebugManager.instance.GetAction(DebugAction.NextDebugPanel) != 0f)
{
SelectNextPanel();
}
if (DebugManager.instance.GetAction(DebugAction.Action) != 0f)
ActivateSelection();
if (DebugManager.instance.GetAction(DebugAction.MakePersistent) != 0f && m_SelectedWidget != null)
DebugManager.instance.TogglePersistent(m_SelectedWidget.GetWidget());
float moveHorizontal = DebugManager.instance.GetAction(DebugAction.MoveHorizontal);
if (moveHorizontal != 0f)
ChangeSelectionValue(moveHorizontal);
float moveVertical = DebugManager.instance.GetAction(DebugAction.MoveVertical);
if (moveVertical != 0f)
{
if (moveVertical < 0f)
SelectNextItem();
else
SelectPreviousItem();
}
}
internal void SetScrollTarget(DebugUIHandlerWidget widget)
{
if (m_UIPanels != null && m_SelectedPanel < m_UIPanels.Count && m_UIPanels[m_SelectedPanel] != null)
m_UIPanels[m_SelectedPanel].SetScrollTarget(widget);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 76db615e524a19c4990482d75a475543
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,167 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for color widget.
/// </summary>
public class DebugUIHandlerColor : DebugUIHandlerWidget
{
/// <summary>Name of the widget.</summary>
public Text nameLabel;
/// <summary>/// <summary>Name of the widget.</summary>alue toggle.</summary>
public UIFoldout valueToggle;
/// <summary>Color image.</summary>
public Image colorImage;
/// <summary>Red float field.</summary>
public DebugUIHandlerIndirectFloatField fieldR;
/// <summary>Green float field.</summary>
public DebugUIHandlerIndirectFloatField fieldG;
/// <summary>Blue float field.</summary>
public DebugUIHandlerIndirectFloatField fieldB;
/// <summary>Alpha float field.</summary>
public DebugUIHandlerIndirectFloatField fieldA;
DebugUI.ColorField m_Field;
DebugUIHandlerContainer m_Container;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.ColorField>();
m_Container = GetComponent<DebugUIHandlerContainer>();
nameLabel.text = m_Field.displayName;
fieldR.getter = () => m_Field.GetValue().r;
fieldR.setter = x => SetValue(x, r: true);
fieldR.nextUIHandler = fieldG;
SetupSettings(fieldR);
fieldG.getter = () => m_Field.GetValue().g;
fieldG.setter = x => SetValue(x, g: true);
fieldG.previousUIHandler = fieldR;
fieldG.nextUIHandler = fieldB;
SetupSettings(fieldG);
fieldB.getter = () => m_Field.GetValue().b;
fieldB.setter = x => SetValue(x, b: true);
fieldB.previousUIHandler = fieldG;
fieldB.nextUIHandler = m_Field.showAlpha ? fieldA : null;
SetupSettings(fieldB);
fieldA.gameObject.SetActive(m_Field.showAlpha);
fieldA.getter = () => m_Field.GetValue().a;
fieldA.setter = x => SetValue(x, a: true);
fieldA.previousUIHandler = fieldB;
SetupSettings(fieldA);
UpdateColor();
}
void SetValue(float x, bool r = false, bool g = false, bool b = false, bool a = false)
{
var color = m_Field.GetValue();
if (r) color.r = x;
if (g) color.g = x;
if (b) color.b = x;
if (a) color.a = x;
m_Field.SetValue(color);
UpdateColor();
}
void SetupSettings(DebugUIHandlerIndirectFloatField field)
{
field.parentUIHandler = this;
field.incStepGetter = () => m_Field.incStep;
field.incStepMultGetter = () => m_Field.incStepMult;
field.decimalsGetter = () => m_Field.decimals;
field.Init();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>State of the widget.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (fromNext || valueToggle.isOn == false)
{
nameLabel.color = colorSelected;
}
else if (valueToggle.isOn)
{
if (m_Container.IsDirectChild(previous))
{
nameLabel.color = colorSelected;
}
else
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
}
}
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
valueToggle.isOn = true;
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
valueToggle.isOn = false;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
valueToggle.isOn = !valueToggle.isOn;
}
internal void UpdateColor()
{
if (colorImage != null)
colorImage.color = m_Field.GetValue();
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next child.</returns>
public override DebugUIHandlerWidget Next()
{
if (!valueToggle.isOn || m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 590d0a4a23369fe4094bee34430c4b38
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
using System.Collections.Generic;
using System.Linq;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for container widget.
/// </summary>
public class DebugUIHandlerContainer : MonoBehaviour
{
/// <summary>Content holder.</summary>
[SerializeField]
public RectTransform contentHolder;
internal DebugUIHandlerWidget GetFirstItem()
{
if (contentHolder.childCount == 0)
return null;
var items = GetActiveChildren();
if (items.Count == 0)
return null;
return items[0];
}
internal DebugUIHandlerWidget GetLastItem()
{
if (contentHolder.childCount == 0)
return null;
var items = GetActiveChildren();
if (items.Count == 0)
return null;
return items[items.Count - 1];
}
internal bool IsDirectChild(DebugUIHandlerWidget widget)
{
if (contentHolder.childCount == 0)
return false;
return GetActiveChildren()
.Count(x => x == widget) > 0;
}
List<DebugUIHandlerWidget> GetActiveChildren()
{
var list = new List<DebugUIHandlerWidget>();
foreach (Transform t in contentHolder)
{
if (!t.gameObject.activeInHierarchy)
continue;
var c = t.GetComponent<DebugUIHandlerWidget>();
if (c != null)
list.Add(c);
}
return list;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2bd470ffc0c0fe54faddbf8d466bf519
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,133 @@
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for enumerator widget.
/// </summary>
public class DebugUIHandlerEnumField : DebugUIHandlerField<DebugUI.EnumField>
{
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
if (m_Field.enumValues.Length == 0)
return;
var array = m_Field.enumValues;
int index = m_Field.currentIndex;
if (index == array.Length - 1)
{
index = 0;
}
else
{
if (fast)
{
//check if quickSeparators have not been constructed
//it is the case when not constructed with autoenum
var separators = m_Field.quickSeparators;
if (separators == null)
{
m_Field.InitQuickSeparators();
separators = m_Field.quickSeparators;
}
int idxSup = 0;
for (; idxSup < separators.Length && index + 1 > separators[idxSup]; ++idxSup) ;
if (idxSup == separators.Length)
{
index = 0;
}
else
{
index = separators[idxSup];
}
}
else
{
index += 1;
}
}
m_Field.SetValue(array[index]);
m_Field.currentIndex = index;
UpdateValueLabel();
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
if (m_Field.enumValues.Length == 0)
return;
var array = m_Field.enumValues;
int index = m_Field.currentIndex;
if (index == 0)
{
if (fast)
{
//check if quickSeparators have not been constructed
//it is thecase when not constructed with autoenum
var separators = m_Field.quickSeparators;
if (separators == null)
{
m_Field.InitQuickSeparators();
separators = m_Field.quickSeparators;
}
index = separators[separators.Length - 1];
}
else
{
index = array.Length - 1;
}
}
else
{
if (fast)
{
//check if quickSeparators have not been constructed
//it is the case when not constructed with autoenum
var separators = m_Field.quickSeparators;
if (separators == null)
{
m_Field.InitQuickSeparators();
separators = m_Field.quickSeparators;
}
int idxInf = separators.Length - 1;
for (; idxInf > 0 && index <= separators[idxInf]; --idxInf) ;
index = separators[idxInf];
}
else
{
index -= 1;
}
}
m_Field.SetValue(array[index]);
m_Field.currentIndex = index;
UpdateValueLabel();
}
/// <summary>
/// Update the label of the widget.
/// </summary>
public override void UpdateValueLabel()
{
int index = m_Field.currentIndex;
// Fallback just in case, we may be handling sub/sectionned enums here
if (index < 0)
index = 0;
SetLabelText(m_Field.enumNames[index].text);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0ca07cb82ca30874c849ad6a8be4ce42
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,66 @@
using System.Collections;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for enum with history widget.
/// </summary>
public class DebugUIHandlerEnumHistory : DebugUIHandlerEnumField
{
Text[] historyValues;
const float k_XOffset = 230f;
internal override void SetWidget(DebugUI.Widget widget)
{
int historyDepth = (widget as DebugUI.HistoryEnumField)?.historyDepth ?? 0;
historyValues = new Text[historyDepth];
float columnOffset = historyDepth > 0 ? k_XOffset / (float)historyDepth : 0f;
for (int index = 0; index < historyDepth; ++index)
{
var historyValue = Instantiate(valueLabel, transform);
Vector3 pos = historyValue.transform.position;
pos.x += (index + 1) * columnOffset;
historyValue.transform.position = pos;
var text = historyValue.GetComponent<Text>();
text.color = new Color32(110, 110, 110, 255);
historyValues[index] = text;
}
//this call UpdateValueLabel which will rely on historyToggles
base.SetWidget(widget);
}
/// <summary>
/// Update the label of the widget.
/// </summary>
public override void UpdateValueLabel()
{
int index = m_Field.currentIndex;
// Fallback just in case, we may be handling sub/sectionned enums here
if (index < 0)
index = 0;
valueLabel.text = m_Field.enumNames[index].text;
DebugUI.HistoryEnumField field = m_Field as DebugUI.HistoryEnumField;
int historyDepth = field?.historyDepth ?? 0;
for (int indexHistory = 0; indexHistory < historyDepth; ++indexHistory)
{
if (indexHistory < historyValues.Length && historyValues[indexHistory] != null)
historyValues[indexHistory].text = field.enumNames[field.GetHistoryValue(indexHistory)].text;
}
if (isActiveAndEnabled)
StartCoroutine(RefreshAfterSanitization());
}
IEnumerator RefreshAfterSanitization()
{
yield return null; //wait one frame
m_Field.currentIndex = m_Field.getIndex();
valueLabel.text = m_Field.enumNames[m_Field.currentIndex].text;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ecc0d22e5e3de604f9e4d3d8997e9122
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,98 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// Base class for handling UI actions for widgets.
/// </summary>
/// <typeparam name="T">Base type for the field</typeparam>
public abstract class DebugUIHandlerField<T> : DebugUIHandlerWidget
where T : DebugUI.Widget
{
/// <summary>Text displayed for the "next" button.</summary>
public Text nextButtonText;
/// <summary>Text displayed for the "previous" button.</summary>
public Text previousButtonText;
/// <summary>Name of the enum field.</summary>
public Text nameLabel;
/// <summary>Value of the enum field.</summary>
public Text valueLabel;
/// <summary>
/// The field
/// </summary>
internal protected T m_Field;
/// <summary>
/// Sets the widget and updates the label
/// </summary>
/// <param name="widget">The <see cref="DebugUI.Widget"/></param>
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<T>();
nameLabel.text = m_Field.displayName;
UpdateValueLabel();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>State of the widget.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (nextButtonText != null)
nextButtonText.color = colorSelected;
if (previousButtonText != null)
previousButtonText.color = colorSelected;
nameLabel.color = colorSelected;
valueLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
if (nextButtonText != null)
nextButtonText.color = colorDefault;
if (previousButtonText != null)
previousButtonText.color = colorDefault;
nameLabel.color = colorDefault;
valueLabel.color = colorDefault;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
OnIncrement(false);
}
/// <summary>
/// Update the label of the widget.
/// </summary>
public abstract void UpdateValueLabel();
/// <summary>
/// Sets the label text
/// </summary>
/// <param name="text">The text to set to the label</param>
protected void SetLabelText(string text)
{
// The UI implementation is tight with space, so let's just truncate the string here if too long.
const int maxLength = 26;
if (text.Length > maxLength)
{
text = text.Substring(0, maxLength - 3) + "...";
}
valueLabel.text = text;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a117669f07d7994419ebdfb1a79e13db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,77 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for float widget.
/// </summary>
public class DebugUIHandlerFloatField : DebugUIHandlerWidget
{
/// <summary>Name of the enum field.</summary>
public Text nameLabel;
/// <summary>Value of the enum field.</summary>
public Text valueLabel;
DebugUI.FloatField m_Field;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.FloatField>();
nameLabel.text = m_Field.displayName;
UpdateValueLabel();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
valueLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
valueLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
ChangeValue(fast, 1);
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
ChangeValue(fast, -1);
}
void ChangeValue(bool fast, float multiplier)
{
float value = m_Field.GetValue();
value += m_Field.incStep * (fast ? m_Field.incStepMult : 1f) * multiplier;
m_Field.SetValue(value);
UpdateValueLabel();
}
void UpdateValueLabel()
{
valueLabel.text = m_Field.GetValue().ToString("N" + m_Field.decimals);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2c71addad67814c418e8376c7fabd008
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,139 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for foldout widget.
/// </summary>
public class DebugUIHandlerFoldout : DebugUIHandlerWidget
{
/// <summary>Name of the Foldout.</summary>
public Text nameLabel;
/// <summary>Toggle value of the Foldout.</summary>
public UIFoldout valueToggle;
DebugUI.Foldout m_Field;
DebugUIHandlerContainer m_Container;
const float k_FoldoutXOffset = 215f;
const float k_XOffset = 230f;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.Foldout>();
m_Container = GetComponent<DebugUIHandlerContainer>();
nameLabel.text = m_Field.displayName;
int columnNumber = m_Field.columnLabels?.Length ?? 0;
float columnOffset = columnNumber > 0 ? k_XOffset / (float)columnNumber : 0f;
for (int index = 0; index < columnNumber; ++index)
{
var column = Instantiate(nameLabel.gameObject, GetComponent<DebugUIHandlerContainer>().contentHolder);
column.AddComponent<LayoutElement>().ignoreLayout = true;
var rectTransform = column.transform as RectTransform;
var originalTransform = nameLabel.transform as RectTransform;
rectTransform.anchorMax = rectTransform.anchorMin = new Vector2(0, 1);
rectTransform.sizeDelta = new Vector2(100, 26);
Vector3 pos = originalTransform.anchoredPosition;
pos.x += (index + 1) * columnOffset + k_FoldoutXOffset;
rectTransform.anchoredPosition = pos;
rectTransform.pivot = new Vector2(0, 0.5f);
rectTransform.eulerAngles = new Vector3(0, 0, 13);
var text = column.GetComponent<Text>();
text.fontSize = 15;
text.text = m_Field.columnLabels[index];
}
UpdateValue();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (fromNext || valueToggle.isOn == false)
{
nameLabel.color = colorSelected;
}
else if (valueToggle.isOn)
{
if (m_Container.IsDirectChild(previous))
{
nameLabel.color = colorSelected;
}
else
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
}
}
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
m_Field.SetValue(true);
UpdateValue();
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
m_Field.SetValue(false);
UpdateValue();
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
bool value = !m_Field.GetValue();
m_Field.SetValue(value);
UpdateValue();
}
void UpdateValue()
{
valueToggle.isOn = m_Field.GetValue();
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public override DebugUIHandlerWidget Next()
{
if (!m_Field.GetValue() || m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4e5dc9f9bba5df14fbe439bcc4c67063
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,64 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for group widget.
/// </summary>
public class DebugUIHandlerGroup : DebugUIHandlerWidget
{
/// <summary>Name of the group.</summary>
public Text nameLabel;
/// <summary>Header of the group.</summary>
public Transform header;
DebugUI.Container m_Field;
DebugUIHandlerContainer m_Container;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.Container>();
m_Container = GetComponent<DebugUIHandlerContainer>();
if (m_Field.hideDisplayName)
header.gameObject.SetActive(false);
else
nameLabel.text = m_Field.displayName;
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (!fromNext && !m_Container.IsDirectChild(previous))
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
return true;
}
return false;
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public override DebugUIHandlerWidget Next()
{
if (m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c5d44b76204264d4eb90d4a92b067d7d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,51 @@
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for Horizontal Layout widget.
/// </summary>
public class DebugUIHandlerHBox : DebugUIHandlerWidget
{
DebugUIHandlerContainer m_Container;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Container = GetComponent<DebugUIHandlerContainer>();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (!fromNext && !m_Container.IsDirectChild(previous))
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
return true;
}
return false;
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public override DebugUIHandlerWidget Next()
{
if (m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e8261e6f2e5fac44da64da2b23939e9a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,100 @@
using System;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for indirect float widget.
/// </summary>
public class DebugUIHandlerIndirectFloatField : DebugUIHandlerWidget
{
/// <summary>Name of the indirect float field.</summary>
public Text nameLabel;
/// <summary>Value of the indirect float field.</summary>
public Text valueLabel;
/// <summary>
/// Getter function for this indirect widget.
/// </summary>
public Func<float> getter;
/// <summary>
/// Setter function for this indirect widget.
/// </summary>
public Action<float> setter;
/// <summary>
/// Getter function for the increment step of this indirect widget.
/// </summary>
public Func<float> incStepGetter;
/// <summary>
/// Getter function for the increment step multiplier of this indirect widget.
/// </summary>
public Func<float> incStepMultGetter;
/// <summary>
/// Getter function for the number of decimals of this indirect widget.
/// </summary>
public Func<float> decimalsGetter;
/// <summary>
/// Initialize the indirect widget.
/// </summary>
public void Init()
{
UpdateValueLabel();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
valueLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
valueLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
ChangeValue(fast, 1);
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
ChangeValue(fast, -1);
}
void ChangeValue(bool fast, float multiplier)
{
float value = getter();
value += incStepGetter() * (fast ? incStepMultGetter() : 1f) * multiplier;
setter(value);
UpdateValueLabel();
}
void UpdateValueLabel()
{
if (valueLabel != null)
valueLabel.text = getter().ToString("N" + decimalsGetter());
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c42b71ff0e23e2d4a8a32a2bc85acac0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,85 @@
using System;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for indirect toggle widget.
/// </summary>
public class DebugUIHandlerIndirectToggle : DebugUIHandlerWidget
{
/// <summary>
/// Label of the widget.
/// </summary>
public Text nameLabel;
/// <summary>Toggle of the toggle field.</summary>
public Toggle valueToggle;
/// <summary>Checkmark image.</summary>
public Image checkmarkImage;
/// <summary>
/// Getter function for this indirect widget.
/// </summary>
public Func<int, bool> getter;
/// <summary>
/// Setter function for this indirect widget.
/// </summary>
public Action<int, bool> setter;
// Should not be here, this is a byproduct of the Bitfield UI Handler implementation.
internal int index;
/// <summary>
/// Initialize the indirect widget.
/// </summary>
public void Init()
{
UpdateValueLabel();
valueToggle.onValueChanged.AddListener(OnToggleValueChanged);
}
void OnToggleValueChanged(bool value)
{
setter(index, value);
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
checkmarkImage.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
checkmarkImage.color = colorDefault;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
bool value = !getter(index);
setter(index, value);
UpdateValueLabel();
}
internal void UpdateValueLabel()
{
if (valueToggle != null)
valueToggle.isOn = getter(index);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0012fc4688b5d5342a441aa32c0e099e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,78 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for integer widget.
/// </summary>
public class DebugUIHandlerIntField : DebugUIHandlerWidget
{
/// <summary>Name of the int field.</summary>
public Text nameLabel;
/// <summary>Value of the int field.</summary>
public Text valueLabel;
DebugUI.IntField m_Field;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.IntField>();
nameLabel.text = m_Field.displayName;
UpdateValueLabel();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
valueLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
valueLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
ChangeValue(fast, 1);
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
ChangeValue(fast, -1);
}
void ChangeValue(bool fast, int multiplier)
{
int value = m_Field.GetValue();
value += m_Field.incStep * (fast ? m_Field.intStepMult : 1) * multiplier;
m_Field.SetValue(value);
UpdateValueLabel();
}
void UpdateValueLabel()
{
if (valueLabel != null)
valueLabel.text = m_Field.GetValue().ToString("N0");
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3de67e2fb3c96a542b808862989985e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,50 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for MessageBox widget.
/// </summary>
public class DebugUIHandlerMessageBox : DebugUIHandlerWidget
{
/// <summary>Name of the widget.</summary>
public Text nameLabel;
DebugUI.MessageBox m_Field;
static Color32 k_WarningBackgroundColor = new Color32(231, 180, 3, 30);
static Color32 k_WarningTextColor = new Color32(231, 180, 3, 255);
static Color32 k_ErrorBackgroundColor = new Color32(231, 75, 3, 30);
static Color32 k_ErrorTextColor = new Color32(231, 75, 3, 255);
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.MessageBox>();
nameLabel.text = m_Field.displayName;
var image = GetComponent<Image>();
switch (m_Field.style)
{
case DebugUI.MessageBox.Style.Warning:
image.color = k_WarningBackgroundColor;
break;
case DebugUI.MessageBox.Style.Error:
image.color = k_ErrorBackgroundColor;
break;
}
}
/// <summary>
/// Method called when the box is selected
/// </summary>
/// <param name="fromNext">If is from next</param>
/// <param name="previous">The previous <see cref="DebugUIHandlerWidget"/></param>
/// <returns></returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
return false;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e25c98bed7eaeec4cb32c57a5280f85e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,45 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for object widget.
/// </summary>
public class DebugUIHandlerObject : DebugUIHandlerWidget
{
/// <summary>Name of the value field.</summary>
public Text nameLabel;
/// <summary>Value of the value field.</summary>
public Text valueLabel;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
var field = CastWidget<DebugUI.ObjectField>();
nameLabel.text = field.displayName;
valueLabel.text = field.GetValue().name;
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
valueLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
valueLabel.color = colorDefault;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b8b3da1ab40a53c49a3de1e3fe357ad2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,55 @@
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for object list widget.
/// </summary>
public class DebugUIHandlerObjectList : DebugUIHandlerField<DebugUI.ObjectListField>
{
int m_Index;
/// <summary>
/// Sets the widget and updates the label
/// </summary>
/// <param name="widget">The <see cref="DebugUI.Widget"/></param>
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Index = 0;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
m_Index++;
UpdateValueLabel();
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
m_Index--;
UpdateValueLabel();
}
/// <summary>
/// Update the label of the widget.
/// </summary>
public override void UpdateValueLabel()
{
string text = "Empty";
var values = m_Field.GetValue();
if (values != null)
{
m_Index = System.Math.Clamp(m_Index, 0, values.Length - 1);
text = values[m_Index].name;
}
SetLabelText(text);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 79e8dd95427d853478c168019e7ce191
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,79 @@
using System.Linq;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for object popup widget.
/// </summary>
public class DebugUIHandlerObjectPopupField : DebugUIHandlerField<DebugUI.ObjectPopupField>
{
int m_Index;
/// <summary>
/// Sets the widget and updates the label
/// </summary>
/// <param name="widget">The <see cref="DebugUI.Widget"/></param>
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Index = 0;
}
private void ChangeSelectedObject()
{
if (m_Field == null)
return;
var elements = m_Field.getObjects();
if (elements == null)
return;
var elementsArray = elements.ToArray();
var count = elementsArray.Count();
if (m_Index >= count)
{
m_Index = 0;
}
else if (m_Index < 0)
{
m_Index = count - 1;
}
var newSelectedValue = elementsArray[m_Index];
m_Field.SetValue(newSelectedValue);
UpdateValueLabel();
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
m_Index++;
ChangeSelectedObject();
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
m_Index--;
ChangeSelectedObject();
}
/// <summary>
/// Update the label of the widget.
/// </summary>
public override void UpdateValueLabel()
{
var selectedObject = m_Field.GetValue();
string text = (selectedObject != null) ? selectedObject.name : "Empty";
SetLabelText(text);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9721515c2a23578428cf3aa4626db09d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,115 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for panels.
/// </summary>
public class DebugUIHandlerPanel : MonoBehaviour
{
/// <summary>Name of the panel.</summary>
public Text nameLabel;
/// <summary>Scroll rect of the panel.</summary>
public ScrollRect scrollRect;
/// <summary>Viewport of the panel.</summary>
public RectTransform viewport;
/// <summary>Associated canvas.</summary>
public DebugUIHandlerCanvas Canvas;
RectTransform m_ScrollTransform;
RectTransform m_ContentTransform;
RectTransform m_MaskTransform;
DebugUIHandlerWidget m_ScrollTarget;
internal protected DebugUI.Panel m_Panel;
void OnEnable()
{
m_ScrollTransform = scrollRect.GetComponent<RectTransform>();
m_ContentTransform = GetComponent<DebugUIHandlerContainer>().contentHolder;
m_MaskTransform = GetComponentInChildren<Mask>(true).rectTransform;
}
internal void SetPanel(DebugUI.Panel panel)
{
m_Panel = panel;
nameLabel.text = panel.displayName;
}
internal DebugUI.Panel GetPanel()
{
return m_Panel;
}
/// <summary>
/// Select next panel on the canvas.
/// </summary>
public void SelectNextItem()
{
Canvas.SelectNextPanel();
}
/// <summary>
/// Select previous panel on the canvas.
/// </summary>
public void SelectPreviousItem()
{
Canvas.SelectPreviousPanel();
}
/// <summary>
/// Scrollbar value clicked via mouse/touch.
/// </summary>
public void OnScrollbarClicked()
{
DebugManager.instance.SetScrollTarget(null); // Release scroll target
}
internal void SetScrollTarget(DebugUIHandlerWidget target)
{
m_ScrollTarget = target;
}
// TODO: Jumps around with foldouts and the likes, fix me
internal void UpdateScroll()
{
if (m_ScrollTarget == null)
return;
var targetTransform = m_ScrollTarget.GetComponent<RectTransform>();
float itemY = GetYPosInScroll(targetTransform);
float targetY = GetYPosInScroll(m_MaskTransform);
float normalizedDiffY = (targetY - itemY) / (m_ContentTransform.rect.size.y - m_ScrollTransform.rect.size.y);
float normalizedPosY = scrollRect.verticalNormalizedPosition - normalizedDiffY;
normalizedPosY = Mathf.Clamp01(normalizedPosY);
scrollRect.verticalNormalizedPosition = Mathf.Lerp(scrollRect.verticalNormalizedPosition, normalizedPosY, Time.deltaTime * 10f);
}
float GetYPosInScroll(RectTransform target)
{
var pivotOffset = new Vector3(
(0.5f - target.pivot.x) * target.rect.size.x,
(0.5f - target.pivot.y) * target.rect.size.y,
0f
);
var localPos = target.localPosition + pivotOffset;
var worldPos = target.parent.TransformPoint(localPos);
return m_ScrollTransform.TransformPoint(worldPos).y;
}
internal DebugUIHandlerWidget GetFirstItem()
{
return GetComponent<DebugUIHandlerContainer>()
.GetFirstItem();
}
/// <summary>
/// Function to reset DebugManager, provided for UI.
/// </summary>
public void ResetDebugManager()
{
DebugManager.instance.Reset();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5f61540bb3be4c2409cf6d2f51435714
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using UnityEngine.Rendering;
namespace UnityEngine.Rendering.UI
{
class DebugUIHandlerPersistentCanvas : MonoBehaviour
{
public RectTransform panel;
public RectTransform valuePrefab;
List<DebugUIHandlerValue> m_Items = new List<DebugUIHandlerValue>();
// Toggles persistent value widget on/off.
internal void Toggle(DebugUI.Value widget, string displayName = null)
{
int index = m_Items.FindIndex(x => x.GetWidget() == widget);
// Remove
if (index > -1)
{
var item = m_Items[index];
CoreUtils.Destroy(item.gameObject);
m_Items.RemoveAt(index);
return;
}
// Add
var go = Instantiate(valuePrefab, panel, false).gameObject;
var uiHandler = go.GetComponent<DebugUIHandlerValue>();
uiHandler.SetWidget(widget);
uiHandler.nameLabel.text = string.IsNullOrEmpty(displayName) ? widget.displayName : displayName;
m_Items.Add(uiHandler);
}
List<DebugUI.ValueTuple> m_ValueTupleWidgets = new();
// For ValueTuples (multiple values on one row), we cycle through the columns, and turn the widget
// off after the last column.
internal void Toggle(DebugUI.ValueTuple widget, int? forceTupleIndex = null)
{
var val = m_ValueTupleWidgets.Find(x => x == widget);
int tupleIndex = val?.pinnedElementIndex ?? -1;
// Clear old widget
if (val != null)
{
m_ValueTupleWidgets.Remove(val);
Toggle(widget.values[tupleIndex]);
}
if (forceTupleIndex != null)
tupleIndex = forceTupleIndex.Value;
// Enable next widget (unless at the last index)
if (tupleIndex + 1 < widget.numElements)
{
widget.pinnedElementIndex = tupleIndex + 1;
// Add column to name
string displayName = widget.displayName;
if (widget.parent is DebugUI.Foldout)
{
var columnLabels = (widget.parent as DebugUI.Foldout).columnLabels;
if (columnLabels != null && widget.pinnedElementIndex < columnLabels.Length)
{
displayName += $" ({columnLabels[widget.pinnedElementIndex]})";
}
}
Toggle(widget.values[widget.pinnedElementIndex], displayName);
m_ValueTupleWidgets.Add(widget);
}
else
{
widget.pinnedElementIndex = -1;
}
}
internal bool IsEmpty()
{
return m_Items.Count == 0;
}
internal void Clear()
{
foreach (var item in m_Items)
CoreUtils.Destroy(item.gameObject);
m_Items.Clear();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 87177621604658d4e893f55be7cfae4a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,79 @@
using System;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for progress bar widget.
/// </summary>
public class DebugUIHandlerProgressBar : DebugUIHandlerWidget
{
/// <summary>Name of the progress bar.</summary>
public Text nameLabel;
/// <summary>Value of the progress bar.</summary>
public Text valueLabel;
/// <summary>Rectangle representing the progress bar.</summary>
public RectTransform progressBarRect;
DebugUI.ProgressBarValue m_Value;
float m_Timer;
/// <summary>
/// OnEnable implementation.
/// </summary>
protected override void OnEnable()
{
m_Timer = 0f;
}
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Value = CastWidget<DebugUI.ProgressBarValue>();
nameLabel.text = m_Value.displayName;
UpdateValue();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
void Update()
{
if (m_Timer >= m_Value.refreshRate)
{
UpdateValue();
m_Timer -= m_Value.refreshRate;
}
m_Timer += Time.deltaTime;
}
void UpdateValue()
{
float value = (float)m_Value.GetValue();
valueLabel.text = m_Value.FormatString(value);
Vector3 scale = progressBarRect.localScale;
scale.x = value;
progressBarRect.localScale = scale;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1ad6bc96b5de44ad93f820fd338ee684
timeCreated: 1625131386

View File

@@ -0,0 +1,124 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for row widget.
/// </summary>
public class DebugUIHandlerRow : DebugUIHandlerFoldout
{
float m_Timer;
/// <summary>
/// OnEnable implementation.
/// </summary>
protected override void OnEnable()
{
m_Timer = 0f;
}
GameObject GetChild(int index)
{
if (index < 0)
return null;
if (gameObject.transform != null)
{
var firstChild = gameObject.transform.GetChild(1);
if (firstChild != null && firstChild.childCount > index)
{
return firstChild.GetChild(index).gameObject;
}
}
return null;
}
bool TryGetChild(int index, out GameObject child)
{
child = GetChild(index);
return child != null;
}
bool IsActive(DebugUI.Table table, int index, GameObject child)
{
if (!table.GetColumnVisibility(index))
return false;
var valueChild = child.transform.Find("Value");
if (valueChild != null && valueChild.TryGetComponent<Text>(out var text))
return !string.IsNullOrEmpty(text.text);
return true;
}
/// <summary>
/// Update implementation.
/// </summary>
protected void Update()
{
var row = CastWidget<DebugUI.Table.Row>();
var table = row.parent as DebugUI.Table;
float refreshRate = 0.1f;
bool refreshRow = m_Timer >= refreshRate;
if (refreshRow)
m_Timer -= refreshRate;
m_Timer += Time.deltaTime;
for (int i = 0; i < row.children.Count; i++)
{
if (!TryGetChild(i, out var child))
continue;
bool active = IsActive(table, i, child);
if (child != null)
child.SetActive(active);
if (active && refreshRow)
{
if (child.TryGetComponent<DebugUIHandlerColor>(out var color))
color.UpdateColor();
if (child.TryGetComponent<DebugUIHandlerToggle>(out var toggle))
toggle.UpdateValueLabel();
if (child.TryGetComponent<DebugUIHandlerObjectList>(out var list))
list.UpdateValueLabel();
}
}
// Update previous and next ui handlers to skip hidden volumes
var itemWidget = GetChild(0).GetComponent<DebugUIHandlerWidget>();
DebugUIHandlerWidget previous = null;
for (int i = 0; i < row.children.Count; i++)
{
itemWidget.previousUIHandler = previous;
if (!TryGetChild(i, out var child))
continue;
if (IsActive(table, i, child))
previous = itemWidget;
bool found = false;
for (int j = i + 1; j < row.children.Count; j++)
{
if (!TryGetChild(j, out var innerChild))
continue;
if (IsActive(table, j, innerChild))
{
var childWidget = child.GetComponent<DebugUIHandlerWidget>();
itemWidget.nextUIHandler = childWidget;
itemWidget = childWidget;
i = j - 1;
found = true;
break;
}
}
if (!found)
{
itemWidget.nextUIHandler = null;
break;
}
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4822e5675c12bf14d93b254d27ec8bd7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,75 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for toggle widget.
/// </summary>
public class DebugUIHandlerToggle : DebugUIHandlerWidget
{
/// <summary>Name of the toggle.</summary>
public Text nameLabel;
/// <summary>Value of the toggle.</summary>
public Toggle valueToggle;
/// <summary>Checkermark image.</summary>
public Image checkmarkImage;
internal protected DebugUI.BoolField m_Field;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.BoolField>();
nameLabel.text = m_Field.displayName;
UpdateValueLabel();
valueToggle.onValueChanged.AddListener(OnToggleValueChanged);
}
void OnToggleValueChanged(bool value)
{
m_Field.SetValue(value);
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
checkmarkImage.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
checkmarkImage.color = colorDefault;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
bool value = !m_Field.GetValue();
m_Field.SetValue(value);
UpdateValueLabel();
}
/// <summary>
/// Update the label.
/// </summary>
internal protected virtual void UpdateValueLabel()
{
if (valueToggle != null)
valueToggle.isOn = m_Field.GetValue();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 99811d558fd910d4b95f1fd7c0ba9ce9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,61 @@
using System.Collections;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for toggle with history widget.
/// </summary>
public class DebugUIHandlerToggleHistory : DebugUIHandlerToggle
{
Toggle[] historyToggles;
const float k_XOffset = 230f;
internal override void SetWidget(DebugUI.Widget widget)
{
int historyDepth = (widget as DebugUI.HistoryBoolField)?.historyDepth ?? 0;
historyToggles = new Toggle[historyDepth];
float columnOffset = historyDepth > 0 ? k_XOffset / (float)historyDepth : 0f;
for (int index = 0; index < historyDepth; ++index)
{
var historyToggle = Instantiate(valueToggle, transform);
Vector3 pos = historyToggle.transform.position;
pos.x += (index + 1) * columnOffset;
historyToggle.transform.position = pos;
var background = historyToggle.transform.GetChild(0).GetComponent<Image>();
background.sprite = Sprite.Create(Texture2D.whiteTexture, new Rect(-1, -1, 2, 2), Vector2.zero);
background.color = new Color32(50, 50, 50, 120);
var checkmark = background.transform.GetChild(0).GetComponent<Image>();
checkmark.color = new Color32(110, 110, 110, 255);
historyToggles[index] = historyToggle.GetComponent<Toggle>();
}
//this call UpdateValueLabel which will rely on historyToggles
base.SetWidget(widget);
}
/// <summary>
/// Update the label.
/// </summary>
internal protected override void UpdateValueLabel()
{
base.UpdateValueLabel();
DebugUI.HistoryBoolField field = m_Field as DebugUI.HistoryBoolField;
int historyDepth = field?.historyDepth ?? 0;
for (int index = 0; index < historyDepth; ++index)
{
if (index < historyToggles.Length && historyToggles[index] != null)
historyToggles[index].isOn = field.GetHistoryValue(index);
}
if (isActiveAndEnabled)
StartCoroutine(RefreshAfterSanitization());
}
IEnumerator RefreshAfterSanitization()
{
yield return null; //wait one frame
valueToggle.isOn = m_Field.getter();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5535c6474b864a44eb65121514d1edd2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,83 @@
using System;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for unsigned integer widget.
/// </summary>
public class DebugUIHandlerUIntField : DebugUIHandlerWidget
{
/// <summary>Name of the indirect uint field.</summary>
public Text nameLabel;
/// <summary>Value of the indirect uint field.</summary>
public Text valueLabel;
DebugUI.UIntField m_Field;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.UIntField>();
nameLabel.text = m_Field.displayName;
UpdateValueLabel();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
valueLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
valueLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
ChangeValue(fast, 1);
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
ChangeValue(fast, -1);
}
void ChangeValue(bool fast, int multiplier)
{
long value = m_Field.GetValue();
if (value == 0 && multiplier < 0)
return;
value += m_Field.incStep * (fast ? m_Field.intStepMult : 1) * multiplier;
m_Field.SetValue((uint)value);
UpdateValueLabel();
}
void UpdateValueLabel()
{
if (valueLabel != null)
valueLabel.text = m_Field.GetValue().ToString("N0");
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e4700d8d03bde1e4c9138b22dc84d06e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,51 @@
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for vertical layoyut widget.
/// </summary>
public class DebugUIHandlerVBox : DebugUIHandlerWidget
{
DebugUIHandlerContainer m_Container;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Container = GetComponent<DebugUIHandlerContainer>();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (!fromNext && !m_Container.IsDirectChild(previous))
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
return true;
}
return false;
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public override DebugUIHandlerWidget Next()
{
if (m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ee7ce141c3937674f8ac247bbcf63711
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for value widgets.
/// </summary>
public class DebugUIHandlerValue : DebugUIHandlerWidget
{
/// <summary>Name of the value field.</summary>
public Text nameLabel;
/// <summary>Value of the value field.</summary>
public Text valueLabel;
DebugUI.Value m_Field;
protected internal float m_Timer;
static readonly Color k_ZeroColor = Color.gray;
/// <summary>
/// OnEnable implementation.
/// </summary>
protected override void OnEnable()
{
m_Timer = 0f;
}
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.Value>();
nameLabel.text = m_Field.displayName;
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
valueLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
valueLabel.color = colorDefault;
}
void Update()
{
if (m_Timer >= m_Field.refreshRate)
{
var value = m_Field.GetValue();
valueLabel.text = m_Field.FormatString(value);
// De-emphasize zero values by switching to dark gray color
if (value is float)
valueLabel.color = (float)value == 0f ? k_ZeroColor : colorDefault;
m_Timer -= m_Field.refreshRate;
}
m_Timer += Time.deltaTime;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bc78ce7c3bda3b845b1e94eade19277f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,106 @@
using System;
using System.Collections;
using UnityEngine.Assertions;
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for value tuple widget.
/// </summary>
public class DebugUIHandlerValueTuple : DebugUIHandlerWidget
{
/// <summary>Name of the value field.</summary>
public Text nameLabel;
/// <summary>Value of the value field.</summary>
public Text valueLabel;
protected internal DebugUI.ValueTuple m_Field;
protected internal Text[] valueElements;
const float k_XOffset = 230f;
float m_Timer;
static readonly Color k_ZeroColor = Color.gray;
/// <summary>
/// OnEnable implementation.
/// </summary>
protected override void OnEnable()
{
m_Timer = 0f;
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
nameLabel.color = colorSelected;
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
internal override void SetWidget(DebugUI.Widget widget)
{
m_Widget = widget;
m_Field = CastWidget<DebugUI.ValueTuple>();
nameLabel.text = m_Field.displayName;
Debug.Assert(m_Field.numElements > 0);
int numElements = m_Field.numElements;
valueElements = new Text[numElements];
valueElements[0] = valueLabel;
float columnOffset = k_XOffset / (float)numElements;
for (int index = 1; index < numElements; ++index)
{
var valueElement = Instantiate(valueLabel.gameObject, transform);
valueElement.AddComponent<LayoutElement>().ignoreLayout = true;
var rectTransform = valueElement.transform as RectTransform;
var originalTransform = nameLabel.transform as RectTransform;
rectTransform.anchorMax = rectTransform.anchorMin = new Vector2(0, 1);
rectTransform.sizeDelta = new Vector2(100, 26);
Vector3 pos = originalTransform.anchoredPosition;
pos.x += (index + 1) * columnOffset + 200f;
rectTransform.anchoredPosition = pos;
rectTransform.pivot = new Vector2(0, 1);
valueElements[index] = valueElement.GetComponent<Text>();
}
}
internal virtual void UpdateValueLabels()
{
for (int index = 0; index < m_Field.numElements; ++index)
{
if (index < valueElements.Length && valueElements[index] != null)
{
var value = m_Field.values[index].GetValue();
valueElements[index].text = m_Field.values[index].FormatString(value);
// De-emphasize zero values by switching to dark gray color
if (value is float)
valueElements[index].color = (float)value == 0f ? k_ZeroColor : colorDefault;
}
}
}
void Update()
{
if (m_Field != null && m_Timer >= m_Field.refreshRate)
{
UpdateValueLabels();
m_Timer -= m_Field.refreshRate;
}
m_Timer += Time.deltaTime;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4df5db2b89304eb1a8d26c7a547149f9
timeCreated: 1628504094

View File

@@ -0,0 +1,137 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for vector2 widgets.
/// </summary>
public class DebugUIHandlerVector2 : DebugUIHandlerWidget
{
/// <summary>Name of the Vector2 field.</summary>
public Text nameLabel;
/// <summary>Value of the Vector2 toggle.</summary>
public UIFoldout valueToggle;
/// <summary>X float field.</summary>
public DebugUIHandlerIndirectFloatField fieldX;
/// <summary>Y float field.</summary>
public DebugUIHandlerIndirectFloatField fieldY;
DebugUI.Vector2Field m_Field;
DebugUIHandlerContainer m_Container;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.Vector2Field>();
m_Container = GetComponent<DebugUIHandlerContainer>();
nameLabel.text = m_Field.displayName;
fieldX.getter = () => m_Field.GetValue().x;
fieldX.setter = x => SetValue(x, x: true);
fieldX.nextUIHandler = fieldY;
SetupSettings(fieldX);
fieldY.getter = () => m_Field.GetValue().y;
fieldY.setter = x => SetValue(x, y: true);
fieldY.previousUIHandler = fieldX;
SetupSettings(fieldY);
}
void SetValue(float v, bool x = false, bool y = false)
{
var vec = m_Field.GetValue();
if (x) vec.x = v;
if (y) vec.y = v;
m_Field.SetValue(vec);
}
void SetupSettings(DebugUIHandlerIndirectFloatField field)
{
field.parentUIHandler = this;
field.incStepGetter = () => m_Field.incStep;
field.incStepMultGetter = () => m_Field.incStepMult;
field.decimalsGetter = () => m_Field.decimals;
field.Init();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (fromNext || valueToggle.isOn == false)
{
nameLabel.color = colorSelected;
}
else if (valueToggle.isOn)
{
if (m_Container.IsDirectChild(previous))
{
nameLabel.color = colorSelected;
}
else
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
}
}
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
valueToggle.isOn = true;
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
valueToggle.isOn = false;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
valueToggle.isOn = !valueToggle.isOn;
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public override DebugUIHandlerWidget Next()
{
if (!valueToggle.isOn || m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 45cb393cffafe3e4292c35a3a3a94c26
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,146 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for vector3 widget.
/// </summary>
public class DebugUIHandlerVector3 : DebugUIHandlerWidget
{
/// <summary>Name of the Vector3 field.</summary>
public Text nameLabel;
/// <summary>Value of the Vector3 toggle.</summary>
public UIFoldout valueToggle;
/// <summary>X float field.</summary>
public DebugUIHandlerIndirectFloatField fieldX;
/// <summary>Y float field.</summary>
public DebugUIHandlerIndirectFloatField fieldY;
/// <summary>Z float field.</summary>
public DebugUIHandlerIndirectFloatField fieldZ;
DebugUI.Vector3Field m_Field;
DebugUIHandlerContainer m_Container;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.Vector3Field>();
m_Container = GetComponent<DebugUIHandlerContainer>();
nameLabel.text = m_Field.displayName;
fieldX.getter = () => m_Field.GetValue().x;
fieldX.setter = v => SetValue(v, x: true);
fieldX.nextUIHandler = fieldY;
SetupSettings(fieldX);
fieldY.getter = () => m_Field.GetValue().y;
fieldY.setter = v => SetValue(v, y: true);
fieldY.previousUIHandler = fieldX;
fieldY.nextUIHandler = fieldZ;
SetupSettings(fieldY);
fieldZ.getter = () => m_Field.GetValue().z;
fieldZ.setter = v => SetValue(v, z: true);
fieldZ.previousUIHandler = fieldY;
SetupSettings(fieldZ);
}
void SetValue(float v, bool x = false, bool y = false, bool z = false)
{
var vec = m_Field.GetValue();
if (x) vec.x = v;
if (y) vec.y = v;
if (z) vec.z = v;
m_Field.SetValue(vec);
}
void SetupSettings(DebugUIHandlerIndirectFloatField field)
{
field.parentUIHandler = this;
field.incStepGetter = () => m_Field.incStep;
field.incStepMultGetter = () => m_Field.incStepMult;
field.decimalsGetter = () => m_Field.decimals;
field.Init();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (fromNext || valueToggle.isOn == false)
{
nameLabel.color = colorSelected;
}
else if (valueToggle.isOn)
{
if (m_Container.IsDirectChild(previous))
{
nameLabel.color = colorSelected;
}
else
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
}
}
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
valueToggle.isOn = true;
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
valueToggle.isOn = false;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
valueToggle.isOn = !valueToggle.isOn;
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public override DebugUIHandlerWidget Next()
{
if (!valueToggle.isOn || m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cd072512faf9def4aab6bf02a353e37a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,155 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// DebugUIHandler for vector4 widget.
/// </summary>
public class DebugUIHandlerVector4 : DebugUIHandlerWidget
{
/// <summary>Name of the Vector4 field.</summary>
public Text nameLabel;
/// <summary>Value of the Vector4 toggle.</summary>
public UIFoldout valueToggle;
/// <summary>X float field.</summary>
public DebugUIHandlerIndirectFloatField fieldX;
/// <summary>Y float field.</summary>
public DebugUIHandlerIndirectFloatField fieldY;
/// <summary>Z float field.</summary>
public DebugUIHandlerIndirectFloatField fieldZ;
/// <summary>W float field.</summary>
public DebugUIHandlerIndirectFloatField fieldW;
DebugUI.Vector4Field m_Field;
DebugUIHandlerContainer m_Container;
internal override void SetWidget(DebugUI.Widget widget)
{
base.SetWidget(widget);
m_Field = CastWidget<DebugUI.Vector4Field>();
m_Container = GetComponent<DebugUIHandlerContainer>();
nameLabel.text = m_Field.displayName;
fieldX.getter = () => m_Field.GetValue().x;
fieldX.setter = x => SetValue(x, x: true);
fieldX.nextUIHandler = fieldY;
SetupSettings(fieldX);
fieldY.getter = () => m_Field.GetValue().y;
fieldY.setter = x => SetValue(x, y: true);
fieldY.previousUIHandler = fieldX;
fieldY.nextUIHandler = fieldZ;
SetupSettings(fieldY);
fieldZ.getter = () => m_Field.GetValue().z;
fieldZ.setter = x => SetValue(x, z: true);
fieldZ.previousUIHandler = fieldY;
fieldZ.nextUIHandler = fieldW;
SetupSettings(fieldZ);
fieldW.getter = () => m_Field.GetValue().w;
fieldW.setter = x => SetValue(x, w: true);
fieldW.previousUIHandler = fieldZ;
SetupSettings(fieldW);
}
void SetValue(float v, bool x = false, bool y = false, bool z = false, bool w = false)
{
var vec = m_Field.GetValue();
if (x) vec.x = v;
if (y) vec.y = v;
if (z) vec.z = v;
if (w) vec.w = v;
m_Field.SetValue(vec);
}
void SetupSettings(DebugUIHandlerIndirectFloatField field)
{
field.parentUIHandler = this;
field.incStepGetter = () => m_Field.incStep;
field.incStepMultGetter = () => m_Field.incStepMult;
field.decimalsGetter = () => m_Field.decimals;
field.Init();
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public override bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
if (fromNext || valueToggle.isOn == false)
{
nameLabel.color = colorSelected;
}
else if (valueToggle.isOn)
{
if (m_Container.IsDirectChild(previous))
{
nameLabel.color = colorSelected;
}
else
{
var lastItem = m_Container.GetLastItem();
DebugManager.instance.ChangeSelection(lastItem, false);
}
}
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public override void OnDeselection()
{
nameLabel.color = colorDefault;
}
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public override void OnIncrement(bool fast)
{
valueToggle.isOn = true;
}
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public override void OnDecrement(bool fast)
{
valueToggle.isOn = false;
}
/// <summary>
/// OnAction implementation.
/// </summary>
public override void OnAction()
{
valueToggle.isOn = !valueToggle.isOn;
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public override DebugUIHandlerWidget Next()
{
if (!valueToggle.isOn || m_Container == null)
return base.Next();
var firstChild = m_Container.GetFirstItem();
if (firstChild == null)
return base.Next();
return firstChild;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3324982f72b9e2c468cca0fb7a753195
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,146 @@
using System;
namespace UnityEngine.Rendering.UI
{
/// <summary>
/// Base class for handling UI actions for widgets.
/// </summary>
public class DebugUIHandlerWidget : MonoBehaviour
{
/// <summary>
/// Default widget color.
/// </summary>
[HideInInspector]
public Color colorDefault = new Color(0.8f, 0.8f, 0.8f, 1f);
/// <summary>
/// Selected widget color.
/// </summary>
[HideInInspector]
public Color colorSelected = new Color(0.25f, 0.65f, 0.8f, 1f);
/// <summary>
/// Parent widget UI Handler.
/// </summary>
public DebugUIHandlerWidget parentUIHandler { get; set; }
/// <summary>
/// Previous widget UI Handler.
/// </summary>
public DebugUIHandlerWidget previousUIHandler { get; set; }
/// <summary>
/// Next widget UI Handler.
/// </summary>
public DebugUIHandlerWidget nextUIHandler { get; set; }
/// <summary>
/// Associated widget.
/// </summary>
protected DebugUI.Widget m_Widget;
/// <summary>
/// OnEnable implementation.
/// </summary>
protected virtual void OnEnable() { }
internal virtual void SetWidget(DebugUI.Widget widget)
{
m_Widget = widget;
}
internal DebugUI.Widget GetWidget()
{
return m_Widget;
}
/// <summary>
/// Casts the widget to the correct type.
/// </summary>
/// <typeparam name="T">Type of the widget.</typeparam>
/// <returns>Properly cast reference to the widget.</returns>
protected T CastWidget<T>()
where T : DebugUI.Widget
{
var casted = m_Widget as T;
string typeName = m_Widget == null ? "null" : m_Widget.GetType().ToString();
if (casted == null)
throw new InvalidOperationException("Can't cast " + typeName + " to " + typeof(T));
return casted;
}
/// <summary>
/// OnSelection implementation.
/// </summary>
/// <param name="fromNext">True if the selection wrapped around.</param>
/// <param name="previous">Previous widget.</param>
/// <returns>True if the selection is allowed.</returns>
public virtual bool OnSelection(bool fromNext, DebugUIHandlerWidget previous)
{
return true;
}
/// <summary>
/// OnDeselection implementation.
/// </summary>
public virtual void OnDeselection() { }
/// <summary>
/// OnAction implementation.
/// </summary>
public virtual void OnAction() { }
/// <summary>
/// OnIncrement implementation.
/// </summary>
/// <param name="fast">True if incrementing fast.</param>
public virtual void OnIncrement(bool fast) { }
/// <summary>
/// OnDecrement implementation.
/// </summary>
/// <param name="fast">Trye if decrementing fast.</param>
public virtual void OnDecrement(bool fast) { }
/// <summary>
/// Previous implementation.
/// </summary>
/// <returns>Previous widget UI handler, parent if there is none.</returns>
public virtual DebugUIHandlerWidget Previous()
{
if (previousUIHandler != null)
return previousUIHandler;
if (parentUIHandler != null)
return parentUIHandler;
return null;
}
/// <summary>
/// Next implementation.
/// </summary>
/// <returns>Next widget UI handler, parent if there is none.</returns>
public virtual DebugUIHandlerWidget Next()
{
if (nextUIHandler != null)
return nextUIHandler;
if (parentUIHandler != null)
{
var p = parentUIHandler;
while (p != null)
{
var n = p.nextUIHandler;
if (n != null)
return n;
p = p.parentUIHandler;
}
}
return null;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b70527f884154e34488f81fce789ef50
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,60 @@
using UnityEngine.UI;
namespace UnityEngine.Rendering.UI
{
/// <summary>Foldout in the DebugMenu</summary>
[ExecuteAlways]
public class UIFoldout : Toggle
{
/// <summary>Contents inside the toggle</summary>
public GameObject content;
/// <summary>Arror in state opened</summary>
public GameObject arrowOpened;
/// <summary>Arror in state closed</summary>
public GameObject arrowClosed;
/// <summary>Start of this GameObject lifecicle</summary>
protected override void Start()
{
base.Start();
onValueChanged.AddListener(SetState);
SetState(isOn);
}
#pragma warning disable 108,114
void OnValidate()
{
SetState(isOn, false);
}
#pragma warning restore 108,114
/// <summary>Change the state of this foldout</summary>
/// <param name="state">The new State</param>
public void SetState(bool state)
{
SetState(state, true);
}
/// <summary>Change the state of this foldout</summary>
/// <param name="state">The new State</param>
/// <param name="rebuildLayout">If True, the layout will be rebuild</param>
public void SetState(bool state, bool rebuildLayout)
{
if (arrowOpened == null || arrowClosed == null || content == null)
return;
if (arrowOpened.activeSelf != state)
arrowOpened.SetActive(state);
if (arrowClosed.activeSelf == state)
arrowClosed.SetActive(!state);
if (content.activeSelf != state)
content.SetActive(state);
if (rebuildLayout)
LayoutRebuilder.ForceRebuildLayoutImmediate(transform.parent as RectTransform);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e4786b5477cac0a42855b21fdaa2242f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dbf7c066574f12a439bf604f2214a450
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 B

View File

@@ -0,0 +1,103 @@
fileFormatVersion: 2
guid: f224bfd122877a34aa49c63693fc317b
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 90c9d85a941678d4baaa88ac23dfb063
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

View File

@@ -0,0 +1,103 @@
fileFormatVersion: 2
guid: b346b2a2df1d290438be3287b6419408
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

View File

@@ -0,0 +1,103 @@
fileFormatVersion: 2
guid: d49e78756811bfa4aafb8b6535417991
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 2, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 7c2dae9776ad5504a9e88720c35e70fb
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,103 @@
fileFormatVersion: 2
guid: 7a0568d5e3330b84687e307992be3030
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 6d12128010a42ec4aa299147a8ff2f59
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,103 @@
fileFormatVersion: 2
guid: a674720496c1ed248a5b7ea3e22a11fd
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: da3c03fbffbf20a409999f3c408813dc
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 B

View File

@@ -0,0 +1,103 @@
fileFormatVersion: 2
guid: 127279d577f25ac4ea17dae3782e5074
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 32
resizeAlgorithm: 1
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: eec12fb14a4bf99489cbcab7362ea366
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4b0ba40f636c768488950e485bd520cb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7c78b588b2e1f7c4a86ca4a985cf6e4a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,213 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1349998662384948}
m_IsPrefabParent: 1
--- !u!1 &1346781532117404
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224019920140556580}
- component: {fileID: 222080438315005238}
- component: {fileID: 114152708984687776}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1349998662384948
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224438017010656346}
- component: {fileID: 222869912906783786}
- component: {fileID: 114163390439191134}
- component: {fileID: 114467080906542876}
- component: {fileID: 114307598231942114}
m_Layer: 5
m_Name: DebugUI Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &114152708984687776
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1346781532117404}
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: 0.8, g: 0.8, b: 0.8, 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: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3}
m_FontSize: 16
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Button
--- !u!114 &114163390439191134
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1349998662384948}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, 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_Sprite: {fileID: 21300000, guid: d49e78756811bfa4aafb8b6535417991, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114307598231942114
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1349998662384948}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8bff080b4e3bae64c80b54402ced6cc6, type: 3}
m_Name:
m_EditorClassIdentifier:
colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1}
colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1}
nameLabel: {fileID: 114152708984687776}
--- !u!114 &114467080906542876
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1349998662384948}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
m_Colors:
m_NormalColor: {r: 0, g: 0, b: 0, a: 0.60784316}
m_HighlightedColor: {r: 0, g: 0, b: 0, a: 0.8666667}
m_PressedColor: {r: 0.28235295, g: 0.28235295, b: 0.28235295, a: 1}
m_DisabledColor: {r: 0, g: 0, b: 0, a: 0.28627452}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 114163390439191134}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!222 &222080438315005238
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1346781532117404}
--- !u!222 &222869912906783786
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1349998662384948}
--- !u!224 &224019920140556580
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1346781532117404}
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: 224438017010656346}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224438017010656346
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1349998662384948}
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:
- {fileID: 224019920140556580}
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: 26}
m_Pivot: {x: 0.5, y: 0.5}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f6ce33b91f6ffe54cadacbf4bb112440
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 77c185820dd1a464eac89cae3abccddf
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,532 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1311110376158742
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224224135738715566}
- component: {fileID: 114506562444320092}
m_Layer: 5
m_Name: DebugUIEnumField
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224224135738715566
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1311110376158742}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 224082802897306466}
- {fileID: 73524541048352296}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &114506562444320092
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1311110376158742}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ca07cb82ca30874c849ad6a8be4ce42, type: 3}
m_Name:
m_EditorClassIdentifier:
colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1}
colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1}
nextButtonText: {fileID: 1122682645790643364}
previousButtonText: {fileID: 5991968131668804396}
nameLabel: {fileID: 114749518858187484}
valueLabel: {fileID: 114525189159037378}
--- !u!1 &1318931732956078
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224082802897306466}
- component: {fileID: 222666496576361700}
- component: {fileID: 114749518858187484}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224082802897306466
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1318931732956078}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 224224135738715566}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 270, y: 16}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &222666496576361700
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1318931732956078}
m_CullTransparentMesh: 0
--- !u!114 &114749518858187484
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1318931732956078}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3}
m_FontSize: 16
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: wibble
--- !u!1 &1489651458712568
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 224794258446302326}
- component: {fileID: 222110064721837410}
- component: {fileID: 114525189159037378}
m_Layer: 5
m_Name: Value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &224794258446302326
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1489651458712568}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 73524541048352296}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -80, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222110064721837410
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1489651458712568}
m_CullTransparentMesh: 0
--- !u!114 &114525189159037378
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1489651458712568}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3}
m_FontSize: 16
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: Enum
--- !u!1 &5170338306183638078
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 73524541048352296}
m_Layer: 5
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &73524541048352296
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5170338306183638078}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1881800067243094030}
- {fileID: 224794258446302326}
- {fileID: 5949731805867224018}
m_Father: {fileID: 224224135738715566}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: -26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5539936913609446775
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5949731805867224018}
- component: {fileID: 3410995964130187825}
- component: {fileID: 171064836484364327}
- component: {fileID: 1122682645790643364}
m_Layer: 5
m_Name: Increment
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5949731805867224018
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5539936913609446775}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 73524541048352296}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 1, y: 0.5}
--- !u!222 &3410995964130187825
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5539936913609446775}
m_CullTransparentMesh: 0
--- !u!114 &171064836484364327
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5539936913609446775}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1122682645790643364}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 114506562444320092}
m_TargetAssemblyTypeName:
m_MethodName: OnIncrement
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 1
--- !u!114 &1122682645790643364
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5539936913609446775}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3}
m_FontSize: 16
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: '>'
--- !u!1 &6187864743549253699
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1881800067243094030}
- component: {fileID: 5373617172578495976}
- component: {fileID: 7012455541135481670}
- component: {fileID: 5991968131668804396}
m_Layer: 5
m_Name: Decrement
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1881800067243094030
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6187864743549253699}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 73524541048352296}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &5373617172578495976
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6187864743549253699}
m_CullTransparentMesh: 0
--- !u!114 &7012455541135481670
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6187864743549253699}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 0
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5991968131668804396}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 114506562444320092}
m_TargetAssemblyTypeName:
m_MethodName: OnDecrement
m_Mode: 6
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 1
--- !u!114 &5991968131668804396
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6187864743549253699}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3}
m_FontSize: 16
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: <

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 988db55689193434fb0b3b89538f978f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,217 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1205328279998559140
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8828311818677054686}
- component: {fileID: 6892336960305635697}
- component: {fileID: 7366739618473192611}
m_Layer: 5
m_Name: Value
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8828311818677054686
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1205328279998559140}
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: 8535926254376877601}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6892336960305635697
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1205328279998559140}
m_CullTransparentMesh: 0
--- !u!114 &7366739618473192611
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1205328279998559140}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
m_RaycastTarget: 0
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: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3}
m_FontSize: 12
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 1
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: < 0 >
--- !u!1 &3734445388003485314
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8535926254376877601}
- component: {fileID: 6127496435193308922}
m_Layer: 5
m_Name: DebugUI EnumHistory
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8535926254376877601
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3734445388003485314}
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:
- {fileID: 5991805839592987070}
- {fileID: 8828311818677054686}
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: 26}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6127496435193308922
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3734445388003485314}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: ecc0d22e5e3de604f9e4d3d8997e9122, type: 3}
m_Name:
m_EditorClassIdentifier:
colorDefault: {r: 0.8, g: 0.8, b: 0.8, a: 1}
colorSelected: {r: 0.25, g: 0.65, b: 0.8, a: 1}
nameLabel: {fileID: 2309423972571977096}
valueLabel: {fileID: 7366739618473192611}
--- !u!1 &3930833054956949072
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5991805839592987070}
- component: {fileID: 1594499422264008796}
- component: {fileID: 2309423972571977096}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5991805839592987070
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3930833054956949072}
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: 8535926254376877601}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1594499422264008796
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3930833054956949072}
m_CullTransparentMesh: 0
--- !u!114 &2309423972571977096
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3930833054956949072}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8, g: 0.8, b: 0.8, a: 1}
m_RaycastTarget: 0
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: 12800000, guid: 74a5091d8707f334b9a5c31ef71a64ba, type: 3}
m_FontSize: 16
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: New Text

Some files were not shown because too many files have changed in this diff Show More