PageSlider插件

This commit is contained in:
fatiao 2025-09-28 10:09:10 +08:00
parent 89c8f158fc
commit 1c86d52011
54 changed files with 6115 additions and 0 deletions

View File

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

View File

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

View File

@ -0,0 +1,716 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.12731749, g: 0.13414757, b: 0.1210787, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!114 &541157545 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
m_PrefabInstance: {fileID: 4962108537005004011}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dbf0c32f155b20048b21aeccc9833005, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &963194225
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 963194228}
- component: {fileID: 963194227}
- component: {fileID: 963194226}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &963194226
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 1
--- !u!20 &963194227
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.16981131, g: 0.16981131, b: 0.16981131, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &963194228
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!224 &1519821910 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
m_PrefabInstance: {fileID: 2230961183580555040}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1519821911 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2230961182348911479, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
m_PrefabInstance: {fileID: 2230961183580555040}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a1f07685a4050348b9d6de611b64b21, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1582194256
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1582194260}
- component: {fileID: 1582194259}
- component: {fileID: 1582194258}
- component: {fileID: 1582194257}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1582194257
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1582194256}
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 &1582194258
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1582194256}
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!223 &1582194259
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1582194256}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1582194260
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1582194256}
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: 1519821910}
m_Father: {fileID: 0}
m_RootOrder: 1
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!1 &1753993053
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1753993056}
- component: {fileID: 1753993055}
- component: {fileID: 1753993054}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1753993054
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1753993053}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1753993055
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1753993053}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1753993056
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1753993053}
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: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2133493111
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2133493112}
- component: {fileID: 2133493113}
m_Layer: 0
m_Name: Demo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2133493112
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2133493111}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 369.3974, y: 316.19034, z: -6.0627565}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2133493113
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2133493111}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ceaa641571cb66449a6e51f7afd6fccc, type: 3}
m_Name:
m_EditorClassIdentifier:
_slider: {fileID: 1519821911}
_pagePrefab: {fileID: 814526006564363141, guid: 34a6a345d0600164fbba90f6a5737184, type: 3}
_items:
- _text: Photo by Ben Neale on Unsplash
_image: {fileID: 21300000, guid: dc453f7ab7135d545904d3b311fb5d61, type: 3}
- _text: Photo by Olena Bohovyk on Unsplash
_image: {fileID: 21300000, guid: a356509b37a2f78478f4da8b7299f4b5, type: 3}
- _text: Photo by Lorenzo Herrera on Unsplash
_image: {fileID: 21300000, guid: 560e752b0135aa349b88a729a70bb032, type: 3}
--- !u!1001 &2230961183580555040
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1582194260}
m_Modifications:
- target: {fileID: 2230961182348911477, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_Name
value: PageSlider
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911479, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: _contentPrefab
value:
objectReference: {fileID: 8246328283905135103, guid: 34a6a345d0600164fbba90f6a5737184, type: 3}
- target: {fileID: 2230961182348911479, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: _dotsIndicator
value:
objectReference: {fileID: 541157545}
- target: {fileID: 2230961183166010636, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2230961183166010637, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961183693669847, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_VerticalScrollbar
value:
objectReference: {fileID: 0}
- target: {fileID: 2230961183693669847, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_HorizontalScrollbar
value:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
--- !u!1001 &4962108537005004011
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1519821910}
m_Modifications:
- target: {fileID: 4962108537545997377, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_Spacing
value: 8
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _prefab
value:
objectReference: {fileID: 3772900299665377286, guid: ad413e47aab71da4da9dc100f508a93d, type: 3}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[0]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[1]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[2]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[3]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[4]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[5]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[6]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_SizeDelta.y
value: 48
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997388, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_Name
value: PageDotsIndicator
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997388, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 38fa3ae2aeba38b4383ccf5384139e39
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,712 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.12731749, g: 0.13414757, b: 0.1210787, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!114 &541157545 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
m_PrefabInstance: {fileID: 4962108537005004011}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dbf0c32f155b20048b21aeccc9833005, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &963194225
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 963194228}
- component: {fileID: 963194227}
- component: {fileID: 963194226}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &963194226
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 1
--- !u!20 &963194227
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0.16981131, g: 0.16981131, b: 0.16981131, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &963194228
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!224 &1519821910 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
m_PrefabInstance: {fileID: 2230961183580555040}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1519821911 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2230961182348911479, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
m_PrefabInstance: {fileID: 2230961183580555040}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a1f07685a4050348b9d6de611b64b21, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1582194256
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1582194260}
- component: {fileID: 1582194259}
- component: {fileID: 1582194258}
- component: {fileID: 1582194257}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1582194257
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1582194256}
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 &1582194258
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1582194256}
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!223 &1582194259
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1582194256}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1582194260
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1582194256}
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: 1519821910}
m_Father: {fileID: 0}
m_RootOrder: 1
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!1 &1753993053
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1753993056}
- component: {fileID: 1753993055}
- component: {fileID: 1753993054}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1753993054
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1753993053}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SendPointerHoverToParent: 1
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1753993055
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1753993053}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1753993056
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1753993053}
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: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2133493111
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2133493112}
- component: {fileID: 2133493113}
m_Layer: 0
m_Name: Demo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2133493112
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2133493111}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 369.3974, y: 316.19034, z: -6.0627565}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2133493113
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2133493111}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 063d4ddcd5a8f3c4f8f9e8ef94f5e4b7, type: 3}
m_Name:
m_EditorClassIdentifier:
_slider: {fileID: 1519821911}
_pagePrefab: {fileID: 256388038058165246, guid: 2b5467668b887ad4990698a2c3cea31c, type: 3}
_items:
- _text: Photo by Ben Neale on Unsplash
_imageUrl: https://images.unsplash.com/photo-1498736297812-3a08021f206f?q=80&w=2271&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
- _text: Photo by Olena Bohovyk on Unsplash
_imageUrl: https://images.unsplash.com/photo-1606422699425-f7122890005f?q=80&w=2675&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
- _text: Photo by Lorenzo Herrera on Unsplash
_imageUrl: https://images.unsplash.com/photo-1550745165-9bc0b252726f?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D
--- !u!1001 &2230961183580555040
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1582194260}
m_Modifications:
- target: {fileID: 2230961182348911477, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_Name
value: PageSlider
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_SizeDelta.x
value: -2
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchoredPosition.x
value: -1
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911478, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961182348911479, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: _contentPrefab
value:
objectReference: {fileID: 8246328283905135103, guid: 34a6a345d0600164fbba90f6a5737184, type: 3}
- target: {fileID: 2230961182348911479, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: _dotsIndicator
value:
objectReference: {fileID: 541157545}
- target: {fileID: 2230961183166010636, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2230961183166010637, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2230961183693669847, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_VerticalScrollbar
value:
objectReference: {fileID: 0}
- target: {fileID: 2230961183693669847, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
propertyPath: m_HorizontalScrollbar
value:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8b42e8dea396a36498a64d514ba721c0, type: 3}
--- !u!1001 &4962108537005004011
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1519821910}
m_Modifications:
- target: {fileID: 4962108537545997377, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_Spacing
value: 8
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[0]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[1]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[2]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[3]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[4]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[5]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997378, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: _dots.Array.data[6]
value:
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_SizeDelta.y
value: 48
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997379, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997388, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_Name
value: PageDotsIndicator
objectReference: {fileID: 0}
- target: {fileID: 4962108537545997388, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 13282f0048258d84e9b95d38cadfb0fd, type: 3}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5b5cb499807e4894eaa37f4c55238dde
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9fc0d4010bbf28b4594072e72b8655ab
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,43 @@
#region Includes
using System;
using UnityEngine;
#endregion
namespace TS.PageSlider.Demo
{
public class PageSliderDemo : MonoBehaviour
{
#region Variables
[Header("References")]
[SerializeField] private PageSlider _slider;
[SerializeField] private SliderPage _pagePrefab;
[Header("Configuration")]
[SerializeField] private SliderItem[] _items;
#endregion
private void Start()
{
for (int i = 0; i < _items.Length; i++)
{
var page = Instantiate(_pagePrefab);
page.Image = _items[i].Image;
_slider.AddPage((RectTransform)page.transform);
}
}
}
[Serializable]
public class SliderItem
{
[SerializeField] private string _text;
[SerializeField] private Sprite _image;
public string Text { get { return _text; } }
public Sprite Image { get { return _image; } }
}
}

View File

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

View File

@ -0,0 +1,43 @@
#region Includes
using System;
using UnityEngine;
#endregion
namespace TS.PageSlider.Demo
{
public class PageSliderDemoLazy : MonoBehaviour
{
#region Variables
[Header("References")]
[SerializeField] private PageSlider _slider;
[SerializeField] private SliderPageLazy _pagePrefab;
[Header("Configuration")]
[SerializeField] private SliderItemLazy[] _items;
#endregion
private void Start()
{
for (int i = 0; i < _items.Length; i++)
{
var page = Instantiate(_pagePrefab);
page.ImageUrl = _items[i].ImageUrl;
_slider.AddPage((RectTransform)page.transform);
}
}
}
[Serializable]
public class SliderItemLazy
{
[SerializeField] private string _text;
[SerializeField] private string _imageUrl;
public string Text { get { return _text; } }
public string ImageUrl { get { return _imageUrl; } }
}
}

View File

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

View File

@ -0,0 +1,23 @@
#region Includes
using UnityEngine;
using UnityEngine.UI;
#endregion
namespace TS.PageSlider.Demo
{
public class SliderPage : MonoBehaviour
{
#region Variables
[Header("Children")]
[SerializeField] private Image _image;
public Sprite Image
{
get { return _image.sprite; }
set { _image.sprite = value; }
}
#endregion
}
}

View File

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

View File

@ -0,0 +1,55 @@
#region Includes
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
#endregion
namespace TS.PageSlider.Demo
{
public class SliderPageLazy : MonoBehaviour
{
#region Variables
[Header("Children")]
[SerializeField] private Image _image;
public string ImageUrl { get; set; }
private PageView _pageView;
#endregion
private void Awake()
{
_pageView = GetComponent<PageView>();
_pageView.OnChangingToActiveState.AddListener(PageView_ChangingToActiveState);
}
private void PageView_ChangingToActiveState()
{
if(_image.sprite != null) { return; }
StartCoroutine(GetImageRoutine(ImageUrl));
}
private IEnumerator GetImageRoutine(string uri)
{
var request = UnityWebRequestTexture.GetTexture(uri);
yield return request.SendWebRequest();
if (request.result != UnityWebRequest.Result.Success)
{
Debug.Log(request.error);
yield break;
}
var texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
_image.sprite = Sprite.Create(texture, new Rect(0.0f, 0.0f, texture.width, texture.height), new Vector2(0.5f, 0.5f), 100.0f);
_image.color = Color.white;
_image.preserveAspect = true;
}
}
}

View File

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

View File

@ -0,0 +1,229 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6180461282053436698
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6820216826275606805}
- component: {fileID: 8912934061302681927}
- component: {fileID: 4188147904629407771}
m_Layer: 0
m_Name: Image_Scrim
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6820216826275606805
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6180461282053436698}
m_LocalRotation: {x: 0, y: 0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8246328283905135088}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
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!222 &8912934061302681927
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6180461282053436698}
m_CullTransparentMesh: 1
--- !u!114 &4188147904629407771
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6180461282053436698}
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: 1, g: 1, b: 1, 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_Sprite: {fileID: 21300000, guid: 0b9c7f7537fa5c641ad6625caa90fa46, 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!1 &8246328283518510351
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8246328283518510350}
- component: {fileID: 8246328283518510348}
- component: {fileID: 8246328283518510349}
m_Layer: 0
m_Name: Image_Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8246328283518510350
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283518510351}
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: 8246328283905135088}
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!222 &8246328283518510348
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283518510351}
m_CullTransparentMesh: 1
--- !u!114 &8246328283518510349
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283518510351}
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: 1, g: 1, b: 1, 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_Sprite: {fileID: 0}
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!1 &8246328283905135089
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8246328283905135088}
- component: {fileID: 8246328283905135103}
- component: {fileID: 814526006564363141}
m_Layer: 0
m_Name: Slider_Page
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8246328283905135088
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283905135089}
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: 8246328283518510350}
- {fileID: 6820216826275606805}
m_Father: {fileID: 0}
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!114 &8246328283905135103
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283905135089}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 295e6eb8c128dd346b35d6b4fe2578da, type: 3}
m_Name:
m_EditorClassIdentifier:
OnChangingToActiveState:
m_PersistentCalls:
m_Calls: []
OnChangingToInactiveState:
m_PersistentCalls:
m_Calls: []
OnActiveStateChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &814526006564363141
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283905135089}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe58ab394a600394ba5d6e2a433eb00b, type: 3}
m_Name:
m_EditorClassIdentifier:
_image: {fileID: 8246328283518510349}
_label: {fileID: 0}

View File

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

View File

@ -0,0 +1,244 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6180461282053436698
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6820216826275606805}
- component: {fileID: 8912934061302681927}
- component: {fileID: 4188147904629407771}
m_Layer: 0
m_Name: Image_Scrim
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6820216826275606805
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6180461282053436698}
m_LocalRotation: {x: 0, y: 0, z: 1, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8246328283905135088}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 512}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &8912934061302681927
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6180461282053436698}
m_CullTransparentMesh: 1
--- !u!114 &4188147904629407771
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6180461282053436698}
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: 1, g: 1, b: 1, 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_Sprite: {fileID: 21300000, guid: 0b9c7f7537fa5c641ad6625caa90fa46, 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!1 &8246328283518510351
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8246328283518510350}
- component: {fileID: 8246328283518510348}
- component: {fileID: 8246328283518510349}
- component: {fileID: 3716399113354989555}
m_Layer: 0
m_Name: Image_Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8246328283518510350
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283518510351}
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: 8246328283905135088}
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.5, y: 0.5}
--- !u!222 &8246328283518510348
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283518510351}
m_CullTransparentMesh: 1
--- !u!114 &8246328283518510349
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283518510351}
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, g: 0, b: 0, 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_Sprite: {fileID: 0}
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 &3716399113354989555
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283518510351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 86710e43de46f6f4bac7c8e50813a599, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AspectMode: 4
m_AspectRatio: 1
--- !u!1 &8246328283905135089
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8246328283905135088}
- component: {fileID: 8246328283905135103}
- component: {fileID: 256388038058165246}
m_Layer: 0
m_Name: Slider_PageLazy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8246328283905135088
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283905135089}
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: 8246328283518510350}
- {fileID: 6820216826275606805}
m_Father: {fileID: 0}
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!114 &8246328283905135103
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283905135089}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 295e6eb8c128dd346b35d6b4fe2578da, type: 3}
m_Name:
m_EditorClassIdentifier:
OnChangingToActiveState:
m_PersistentCalls:
m_Calls: []
OnChangingToInactiveState:
m_PersistentCalls:
m_Calls: []
OnActiveStateChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &256388038058165246
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8246328283905135089}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 72a5fa7b06b4df744968bfd5e7d68537, type: 3}
m_Name:
m_EditorClassIdentifier:
_image: {fileID: 8246328283518510349}
_label: {fileID: 0}

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 KiB

View File

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: dc453f7ab7135d545904d3b311fb5d61
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
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: 0
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: a356509b37a2f78478f4da8b7299f4b5
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
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: 0
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: 560e752b0135aa349b88a729a70bb032
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
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: 0
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

View File

@ -0,0 +1,135 @@
fileFormatVersion: 2
guid: 0b9c7f7537fa5c641ad6625caa90fa46
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
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: 0
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,440 @@
Namespace TS.PageSlider
Classes
PageContainer
This class represents a container for a page in a paginated view. It handles assigning content to the
container and manages the active state of the contained page.
PageDot
This class represents a single dot indicator used for navigation in a paginated view. It provides
properties for its active state and index, and events for state changes and presses.
PageDotsIndicator
This class manages a collection of page dots used for navigation in a paginated view. It provides
methods to add, clear, and change the active dot.
PageScroller
The PageScroller class manages scrolling within a PageSlider component. It handles user interaction
for swiping between pages and snapping to the closest page on release.
PageSlider
The PageSlider class manages a collection of pages within a PageScroller component. It provides
functionality for adding, removing, and keeping track of pages, as well as handling page change
events.
PageView
This class represents a view or page within a paginated view system. It provides events to signal
changes in the active state of the page.
1 / 15
Class PageContainer
Namespace: TS.PageSlider
This class represents a container for a page in a paginated view. It handles assigning content to the
container and manages the active state of the contained page.
public class PageContainer : MonoBehaviour
Inheritance
System.Object PageContainer
Methods
AssignContent(RectTransform)
Assigns content (RectTransform) to this container. If no content is provided, it creates a new GameObject
with a RectTransform and a PageView component. The assigned content is then parented to this
container and its properties are set to ensure proper positioning and scaling.
public void AssignContent(RectTransform content)
Parameters
content RectTransform
The RectTransform representing the content to be assigned.
ChangeActiveState(bool)
Calls the ChangeActiveState method on the contained PageView component with the provided active
state.
public void ChangeActiveState(bool active)
Parameters
2 / 15
active bool 
True to set the page to active, False to set it to inactive.
ChangingToActiveState()
Calls the ChangingToActiveState method on the contained PageView component, to signal a transition to
an active state.
public void ChangingToActiveState()
ChangingToInactiveState()
Calls the ChangingToInactiveState method on the contained PageView component, to signal a transition
to an inactive state.
public void ChangingToInactiveState()
3 / 15
Class PageDot
Namespace: TS.PageSlider
This class represents a single dot indicator used for navigation in a paginated view. It provides properties
for its active state and index, and events for state changes and presses.
public class PageDot : MonoBehaviour
Inheritance
System.Object PageDot
Fields
OnActiveStateChanged
public UnityEvent<bool> OnActiveStateChanged
Field Value
UnityEvent<bool  >
OnPressed
UnityEvent with an integer parameter that is invoked when the dot is pressed. The parameter represents
the index of the pressed dot.
public UnityEvent<int> OnPressed
Field Value
UnityEvent<int  >
Properties
4 / 15
Index
Gets or sets the index of the page dot within the paginated view.
public int Index { get; set; }
Property Value
int 
IsActive
Gets the active state of the page dot.
public bool IsActive { get; }
Property Value
bool 
Methods
ChangeActiveState(bool)
Changes the active state of the page dot and invokes the OnActiveStateChanged event.
public virtual void ChangeActiveState(bool active)
Parameters
active bool 
True to set the dot active, False to set it inactive.
Press()
Invokes the OnPressed event with the dot's index when the dot is pressed.
5 / 15
public void Press()
6 / 15
Class PageDotsIndicator
Namespace: TS.PageSlider
This class manages a collection of page dots used for navigation in a paginated view. It provides
methods to add, clear, and change the active dot.
public class PageDotsIndicator : MonoBehaviour
Inheritance
System.Object PageDotsIndicator
Fields
OnDotPressed
public UnityEvent<int> OnDotPressed
Field Value
UnityEvent<int  >
Properties
IsVisible
Gets or sets the visibility of the PageDotsIndicator game object.
public bool IsVisible { get; set; }
Property Value
bool 
7 / 15
Methods
Add()
Adds a new page dot indicator to the collection.
public void Add()
ChangeActiveDot(int, int)
Changes the active state of the page dots. It deactivates the dot at the 'fromIndex' and activates the dot
at the 'toIndex'.
public void ChangeActiveDot(int fromIndex, int toIndex)
Parameters
fromIndex int 
The index of the dot to deactivate.
toIndex int 
The index of the dot to activate.
Clear()
Clears all the page dot indicators from the collection and destroys their game objects.
public void Clear()
8 / 15
Class PageScroller
Namespace: TS.PageSlider
The PageScroller class manages scrolling within a PageSlider component. It handles user interaction for
swiping between pages and snapping to the closest page on release.
public class PageScroller : MonoBehaviour, IBeginDragHandler, IEndDragHandler
Inheritance
System.Object PageScroller
Implements
IBeginDragHandler, IEndDragHandler
Fields
OnPageChangeEnded
Event triggered when a page change ends. The event arguments are the index of the current page and
the index of the new active page.
public UnityEvent<int, int> OnPageChangeEnded
Field Value
UnityEvent<int  , int  >
OnPageChangeStarted
public UnityEvent<int, int> OnPageChangeStarted
Field Value
UnityEvent<int  , int  >
9 / 15
Properties
Content
Gets the RectTransform of the content being scrolled within the ScrollRect.
public RectTransform Content { get; }
Property Value
RectTransform
Rect
Gets the rectangle of the ScrollRect component used for scrolling.
public Rect Rect { get; }
Property Value
Rect
Methods
OnBeginDrag(PointerEventData)
public void OnBeginDrag(PointerEventData eventData)
Parameters
eventData PointerEventData
OnEndDrag(PointerEventData)
public void OnEndDrag(PointerEventData eventData)
10 / 15
Parameters
eventData PointerEventData
SetPage(int)
public void SetPage(int index)
Parameters
index int 
11 / 15
Class PageSlider
Namespace: TS.PageSlider
The PageSlider class manages a collection of pages within a PageScroller component. It provides
functionality for adding, removing, and keeping track of pages, as well as handling page change events.
public class PageSlider : MonoBehaviour
Inheritance
System.Object PageSlider
Fields
OnPageChanged
public UnityEvent<PageContainer> OnPageChanged
Field Value
UnityEvent<PageContainer>
Properties
Rect
Gets the rectangle of the PageSlider component.
public Rect Rect { get; }
Property Value
Rect
12 / 15
Methods
AddPage(RectTransform)
Adds a new page to the PageSlider. The content argument specifies the RectTransform of the content to
be displayed on the new page.
public void AddPage(RectTransform content)
Parameters
content RectTransform
The RectTransform of the content to be displayed on the new page.
Clear()
Removes all pages from the PageSlider and clears the associated PageDotsIndicator (if exists).
public void Clear()
13 / 15
Class PageView
Namespace: TS.PageSlider
This class represents a view or page within a paginated view system. It provides events to signal changes
in the active state of the page.
public class PageView : MonoBehaviour
Inheritance
System.Object PageView
Fields
OnActiveStateChanged
UnityEvent with a boolean parameter that is invoked when the active state of the page changes. The
parameter is True if the page becomes active, False if it becomes inactive.
public UnityEvent<bool> OnActiveStateChanged
Field Value
UnityEvent<bool  >
OnChangingToActiveState
public UnityEvent OnChangingToActiveState
Field Value
UnityEvent
OnChangingToInactiveState
14 / 15
UnityEvent that is invoked when the page is about to transition to the inactive state.
public UnityEvent OnChangingToInactiveState
Field Value
UnityEvent
Methods
ChangeActiveState(bool)
Invokes the OnActiveStateChanged event with the provided active state.
public void ChangeActiveState(bool active)
Parameters
active bool 
True to signal the page becoming active, False for inactive.
ChangingToActiveState()
Invokes the OnChangingToActiveState event to signal that the page is about to become active.
public void ChangingToActiveState()
ChangingToInactiveState()
Invokes the OnChangingToInactiveState event to signal that the page is about to become inactive.
public void ChangingToInactiveState()
15 / 15

View File

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

View File

@ -0,0 +1,185 @@
Unity Page Slider
Core Components
Page Slider: This core component manages your entire paginated UI system. It houses your pages,
triggers page change events, and provides overall control.
Page Scroller: This component handles the smooth scrolling of your pages. You can configure
scrolling behavior and receive notifications when a page transition begins or ends
Page View: This serves as the individual page within your paginated system. Here, you build and
customize the layout of each page. It also triggers events when a page is activated or deactivated.
Optional Components
Page Dots Indicator: This optional component provides a collection of dots to visually represent
your pages and aid navigation. Users can interact with these dots to jump to specific pages.
Page Dot: This represents a single dot within the Page Dots Indicator component. Each dot
corresponds to a specific page within your paginated UI.
Setup
You can create a Page Slider in two ways: either with a predefined set of pages and content, or by
loading content dynamically into the slider at runtime. Check the following guides for step-by-step
tutorials:
Using Predefined Content
Implementing Dynamic Content
Helpful links
For a more in-depth explanation, check out this video  .
Explore the API Reference for more details.
Modify the source code available on GitHub  .
Install directly from the Unity Asset Store.
Get in touch with me at tomazsaraiva.com  .
1 / 10
Using Predefined Content
This guide walks you through creating a Page Slider with a predefined set of pages and content.
Unity Page Slider: Using Predefined Content
1. Add the Page Slider
1. Create a new Canvas GameObject.
2. In the Project window, locate the PageSlider prefab within your project's folder structure:
PageSlider/Prefabs/.
3. Drag the PageSlider prefab from the Project window and make it a child of the Canvas in the
Hierarchy.
2. (Optional) Add Page Dots Indicator
2 / 10
1. In the Project window, locate the PageDotsIndicator prefab within your project's folder structure:
PageSlider/Prefabs/.
2. Drag the PageDotsIndicator prefab and make it a child of the PageSlider in the Hierarchy.
3. In the Inspector window, assign the PageDotsIndicator to the Dots Indicator field.
3. Add a new Page
1. Select the PageSlider GameObject.
2. Click the Add Page button in the Inspector window.
3 / 10
3. Expand the PageSlider hierarchy to locate the newly created Page_X/Content GameObject.
4. Select the Content GameObject and add your desired UI elements to configure the page layout.
4 / 10
5. Repeat the previous steps to add more pages.
Helpful links
Understand the main concepts by reading the getting started guide
For a more in-depth explanation, check out this video  .
Explore the API Reference for more details.
Modify the source code available on GitHub  .
Install directly from the Unity Asset Store.
Get in touch with me at tomazsaraiva.com  .
5 / 10
Implementing Dynamic Content
This tutorial explores loading content dynamically into your Page Slider at runtime, allowing for greater
control and adaptability.
Unity Page Slider: Implementing Dynamic Content
1. Add the Page Slider
1. Create a new Canvas GameObject.
2. In the Project window, locate the PageSlider prefab within your project's folder structure:
PageSlider/Prefabs/.
3. Drag the PageSlider prefab from the Project window and make it a child of the Canvas in the
Hierarchy.
6 / 10
2. (Optional) Add Page Dots Indicator
1. In the Project window, locate the PageDotsIndicator prefab within your project's folder structure:
PageSlider/Prefabs/.
2. Drag the PageDotsIndicator prefab and make it a child of the PageSlider in the Hierarchy.
3. Select the PageSlider GameObject.
4. In the Inspector window, assign the PageDotsIndicator to the Dots Indicator field.
3. Create a Page View
1. Select the Canvas GameObject.
2. In the Project window, locate the PageView prefab within your project's folder structure:
PageSlider/Prefabs/.
3. Drag the PageView prefab from the Project window and make it a child of the Canvas in the
Hierarchy.
7 / 10
4. Add your desired UI elements to configure the PageView layout. In this example, I'm adding a single
Label, but the layout can be as complex as you need.
1. Create a new prefab for the PageView layout. The Page Slider will instantiate this prefab at runtime to
generate each page.
2. Disable or remove the page layout from the Scene.
4. Add Pages at runtime
1. Create a new C# script (or use an existing one).
8 / 10
1. Create a reference to the PageSlider and the PageView prefab.
2. Instantiate the pages that you want and configure their properties.
3. Add the pages to the PageSlider using the AddPage method. Please note it accepts a RectTransform
component.
using TMPro;
using TS.PageSlider;
using UnityEngine;
public class PageSliderDemo : MonoBehaviour
{
public PageSlider _pageSlider;
public PageView _pageView;
void Start()
{
for (int i = 0; i < 3; i++)
{
var page = Instantiate(_pageView);
page.GetComponentInChildren<TextMeshProUGUI>().text = i.ToString();
_pageSlider.AddPage((RectTransform)page.transform);
}
}
}
1. Assign the PageSlider and the PageView prefab references.
9 / 10
6. Run the project and the pages will be added dynamically to the PageSlider.
Note: For more complex cases you should create a custom class for the page layout. Check the
Demo_Dynamic and Demo_Lazy available on the GitHub repository  .
Helpful links
Understand the main concepts by reading the getting started guide
For a more in-depth explanation, check out this video  .
Explore the API Reference for more details.
Modify the source code available on GitHub  .
Install directly from the Unity Asset Store.
Get in touch with me at tomazsaraiva.com  .
10 / 10

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3054f0acfd69b054e916e9cc2a97a650
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -0,0 +1,100 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3772900299665377282
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3772900299665377285}
- component: {fileID: 3772900299665377287}
- component: {fileID: 3772900299665377284}
- component: {fileID: 3772900299665377286}
m_Layer: 5
m_Name: PageDot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3772900299665377285
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3772900299665377282}
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: 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: 16, y: 16}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3772900299665377287
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3772900299665377282}
m_CullTransparentMesh: 1
--- !u!114 &3772900299665377284
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3772900299665377282}
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: 1, g: 1, b: 1, 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_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
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 &3772900299665377286
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3772900299665377282}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bf002eaa449ee6d438ace2cb3e9b583f, type: 3}
m_Name:
m_EditorClassIdentifier:
_useImageComponent: 1
_defaultColor: {r: 0.22745098, g: 0.22745098, b: 0.22745098, a: 1}
_selectedColor: {r: 1, g: 1, b: 1, a: 1}
OnActiveStateChanged:
m_PersistentCalls:
m_Calls: []
OnPressed:
m_PersistentCalls:
m_Calls: []

View File

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

View File

@ -0,0 +1,83 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4962108537545997388
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4962108537545997379}
- component: {fileID: 4962108537545997377}
- component: {fileID: 4962108537545997378}
m_Layer: 5
m_Name: PageDotsIndicator
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4962108537545997379
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4962108537545997388}
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: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 100}
m_Pivot: {x: 0.5, y: 0}
--- !u!114 &4962108537545997377
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4962108537545997388}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 8
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &4962108537545997378
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4962108537545997388}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dbf0c32f155b20048b21aeccc9833005, type: 3}
m_Name:
m_EditorClassIdentifier:
_prefab: {fileID: 3772900299665377286, guid: ad413e47aab71da4da9dc100f508a93d, type: 3}
_dots: []
OnDotPressed:
m_PersistentCalls:
m_Calls: []

View File

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

View File

@ -0,0 +1,325 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2230961182167912876
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2230961182167912877}
- component: {fileID: 2230961182167912880}
- component: {fileID: 2230961182167912879}
- component: {fileID: 2230961182167912878}
m_Layer: 5
m_Name: Viewport
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2230961182167912877
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961182167912876}
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: 2230961183166010637}
m_Father: {fileID: 2230961183693669846}
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, y: 1}
--- !u!222 &2230961182167912880
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961182167912876}
m_CullTransparentMesh: 1
--- !u!114 &2230961182167912879
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961182167912876}
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: 1, g: 1, b: 1, 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_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
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 &2230961182167912878
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961182167912876}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowMaskGraphic: 0
--- !u!1 &2230961182348911477
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2230961182348911478}
- component: {fileID: 2230961182348911479}
m_Layer: 5
m_Name: PageSlider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2230961182348911478
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961182348911477}
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: 2230961183693669846}
m_Father: {fileID: 0}
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!114 &2230961182348911479
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961182348911477}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a1f07685a4050348b9d6de611b64b21, type: 3}
m_Name:
m_EditorClassIdentifier:
_dotsIndicator: {fileID: 0}
_pages: []
_startPageIndex: 0
OnPageChanged:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2230961183166010636
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2230961183166010637}
- component: {fileID: 2230961183166010639}
- component: {fileID: 2230961183166010638}
m_Layer: 5
m_Name: Content
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2230961183166010637
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961183166010636}
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: 2230961182167912877}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &2230961183166010639
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961183166010636}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!114 &2230961183166010638
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961183166010636}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0
--- !u!1 &2230961183693669845
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2230961183693669846}
- component: {fileID: 2230961183693669849}
- component: {fileID: 2230961183693669847}
- component: {fileID: 2230961183693669850}
m_Layer: 5
m_Name: Scroll View
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2230961183693669846
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961183693669845}
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: 2230961182167912877}
m_Father: {fileID: 2230961182348911478}
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!222 &2230961183693669849
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961183693669845}
m_CullTransparentMesh: 1
--- !u!114 &2230961183693669847
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961183693669845}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 2230961183166010637}
m_Horizontal: 1
m_Vertical: 1
m_MovementType: 2
m_Elasticity: 0.1
m_Inertia: 0
m_DecelerationRate: 0.135
m_ScrollSensitivity: 1
m_Viewport: {fileID: 2230961182167912877}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 2
m_VerticalScrollbarVisibility: 2
m_HorizontalScrollbarSpacing: -3
m_VerticalScrollbarSpacing: -3
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!114 &2230961183693669850
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2230961183693669845}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5b1f96c19e4716b4f9912eef364b6da3, type: 3}
m_Name:
m_EditorClassIdentifier:
_minDeltaDrag: 0.1
_snapDuration: 0.3
OnPageChangeStarted:
m_PersistentCalls:
m_Calls: []
OnPageChangeEnded:
m_PersistentCalls:
m_Calls: []

View File

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

View File

@ -0,0 +1,60 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4673469910843217911
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4673469910843217904}
- component: {fileID: 8069943486765448238}
m_Layer: 5
m_Name: PageView
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4673469910843217904
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4673469910843217911}
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: 0}
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!114 &8069943486765448238
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4673469910843217911}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 295e6eb8c128dd346b35d6b4fe2578da, type: 3}
m_Name:
m_EditorClassIdentifier:
OnChangingToActiveState:
m_PersistentCalls:
m_Calls: []
OnChangingToInactiveState:
m_PersistentCalls:
m_Calls: []
OnActiveStateChanged:
m_PersistentCalls:
m_Calls: []

View File

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

View File

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

View File

@ -0,0 +1,89 @@
#region Includes
using UnityEngine;
#endregion
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace TS.PageSlider
{
/// <summary>
/// This class represents a container for a page in a paginated view.
/// It handles assigning content to the container and manages the active state of the contained page.
/// </summary>
public class PageContainer : MonoBehaviour
{
#region Variables
[Header("Children")]
// <summary>
/// The PageView component representing the content of this page container.
/// </summary>
[Tooltip("The PageView component representing the content of this page container")]
[SerializeField] private PageView _page;
#endregion
/// <summary>
/// Assigns content (RectTransform) to this container.
/// If no content is provided, it creates a new GameObject with a RectTransform and a PageView component.
/// The assigned content is then parented to this container and its properties are set to ensure proper positioning and scaling.
/// </summary>
/// <param name="content">The RectTransform representing the content to be assigned.</param>
public void AssignContent(RectTransform content)
{
if (content == null)
{
// Create a new GameObject with required components if content is not provided.
var contentObject = new GameObject("Content", typeof(RectTransform), typeof(PageView));
content = contentObject.GetComponent<RectTransform>();
}
content.SetParent(transform);
content.anchorMin = Vector2.zero;
content.anchorMax = Vector2.one;
content.offsetMin = Vector2.zero;
content.offsetMax = Vector2.zero;
content.anchoredPosition = Vector2.zero;
content.localScale = Vector3.one;
_page = content.GetComponent<PageView>();
#if UNITY_EDITOR
EditorUtility.SetDirty(this);
#endif
}
/// <summary>
/// Calls the ChangingToActiveState method on the contained PageView component,
/// to signal a transition to an active state.
/// </summary>
public void ChangingToActiveState()
{
_page.ChangingToActiveState();
}
/// <summary>
/// Calls the ChangingToInactiveState method on the contained PageView component,
/// to signal a transition to an inactive state.
/// </summary>
public void ChangingToInactiveState()
{
_page.ChangingToInactiveState();
}
/// <summary>
/// Calls the ChangeActiveState method on the contained PageView component with the provided active state.
/// </summary>
/// <param name="active">True to set the page to active, False to set it to inactive.</param>
public void ChangeActiveState(bool active)
{
_page.ChangeActiveState(active);
}
}
}

View File

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

View File

@ -0,0 +1,107 @@
#region Includes
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
#endregion
namespace TS.PageSlider
{
/// <summary>
/// This class represents a single dot indicator used for navigation in a paginated view.
/// It provides properties for its active state and index, and events for state changes and presses.
/// </summary>
public class PageDot : MonoBehaviour
{
#region Variables
[Header("Configuration")]
/// <summary>
/// Determines whether it should change the Image component color on state changes
/// </summary>
[Tooltip("Determines whether it should change the Image component color on state changes")]
[SerializeField] private bool _useImageComponent;
/// <summary>
/// Specifies the default color used when the page dot is unselected.
/// </summary>
[Tooltip("Specifies the default color used when the page dot is unselected")]
[SerializeField] private Color _defaultColor;
/// <summary>
/// Specifies the default color used when the page dot is selected.
/// </summary>
[Tooltip("Specifies the default color used when the page dot is selected")]
[SerializeField] private Color _selectedColor;
[Header("Events")]
/// <summary>
/// UnityEvent with a boolean parameter that is invoked when the active state of the dot changes.
/// The parameter is True if the dot becomes active, False if it becomes inactive.
/// </summary>
[Tooltip("Invoked when the active state of the dot changes: True if active, False if inactive")]
public UnityEvent<bool> OnActiveStateChanged;
/// <summary>
/// UnityEvent with an integer parameter that is invoked when the dot is pressed.
/// The parameter represents the index of the pressed dot.
/// </summary>
[Tooltip("Invoked when the dot is pressed with it's index")]
public UnityEvent<int> OnPressed;
/// <summary>
/// Gets the active state of the page dot.
/// </summary>
public bool IsActive { get; private set; }
/// <summary>
/// Gets or sets the index of the page dot within the paginated view.
/// </summary>
public int Index { get; set; }
private Image _image;
#endregion
private void Awake()
{
if (_useImageComponent && !TryGetComponent(out _image))
{
Debug.LogError("No Image Component found");
}
}
private void Start()
{
// HACK: Ideally the dot shouldn't change it's state.
// But the second dot was always active and I don't know why.
// So I'm forcing the dot to update it's state on Start.
ChangeActiveState(IsActive);
}
/// <summary>
/// Changes the active state of the page dot and invokes the OnActiveStateChanged event.
/// </summary>
/// <param name="active">True to set the dot active, False to set it inactive.</param>
public virtual void ChangeActiveState(bool active)
{
IsActive = active;
if (_useImageComponent && _image != null)
{
_image.color = active ? _selectedColor : _defaultColor;
}
OnActiveStateChanged?.Invoke(active);
}
/// <summary>
/// Invokes the OnPressed event with the dot's index when the dot is pressed.
/// </summary>
public void Press()
{
OnPressed?.Invoke(Index);
}
}
}

View File

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

View File

@ -0,0 +1,169 @@
#region Includes
using UnityEngine;
using UnityEngine.Events;
using System.Collections.Generic;
#endregion
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace TS.PageSlider
{
/// <summary>
/// This class manages a collection of page dots used for navigation in a paginated view.
/// It provides methods to add, clear, and change the active dot.
/// </summary>
public class PageDotsIndicator : MonoBehaviour
{
#region Variables
[Header("References")]
/// <summary>
/// Prefab reference for the PageDot component representing a single dot indicator.
/// </summary>
[Tooltip("Prefab reference for the PageDot component representing a single dot indicator")]
[SerializeField] private PageDot _prefab;
[Header("Children")]
/// <summary>
/// List containing references to all currently displayed PageDot instances.
/// </summary>
[Tooltip("List containing references to all currently displayed PageDot instances")]
[SerializeField] private List<PageDot> _dots;
[Header("Events")]
/// <summary>
/// UnityEvent that is invoked when a page dot is pressed, passing the index of the pressed dot.
/// </summary>
[Tooltip("Invoked when a page dot is pressed, passing the index of the pressed dot")]
public UnityEvent<int> OnDotPressed;
/// <summary>
/// Gets or sets the visibility of the PageDotsIndicator game object.
/// </summary>
public bool IsVisible
{
get { return gameObject.activeInHierarchy; }
set { gameObject.SetActive(value); }
}
#endregion
private void Awake()
{
if (_dots.Count == 0) return;
for (int i = 0; i < _dots.Count; i++)
{
_dots[i].ChangeActiveState(i == 0);
}
}
/// <summary>
/// Adds a new page dot indicator to the collection.
/// </summary>
public void Add()
{
PageDot dot = null;
#if UNITY_EDITOR
if (!Application.isPlaying)
{
// In editor mode, use PrefabUtility for non-destructive instantiation.
dot = (PageDot)PrefabUtility.InstantiatePrefab(_prefab, transform);
}
#endif
// If no dot was instantiated in editor mode, use regular Instantiate in play mode.
if (dot == null)
{
dot = Instantiate(_prefab, transform);
}
dot.Index = _dots.Count;
dot.ChangeActiveState(_dots.Count == 0); // Activate the first dot.
_dots.Add(dot);
#if UNITY_EDITOR
if (Application.isPlaying) { return; }
// In editor mode, mark the scene as dirty to save changes.
EditorUtility.SetDirty(this);
#endif
}
/// <summary>
/// Clears all the page dot indicators from the collection and destroys their game objects.
/// </summary>
public void Clear()
{
for (int i = 0; i < _dots.Count; i++)
{
if (_dots[i] == null) { continue; }
#if UNITY_EDITOR
// In editor mode, use DestroyImmediate for immediate object removal.
DestroyImmediate(_dots[i].gameObject);
#else
// In play mode, use Destroy for object removal during gameplay.
Destroy(_dots[i].gameObject);
#endif
}
_dots.Clear();
#if UNITY_EDITOR
// In editor mode, mark the scene as dirty to save changes.
EditorUtility.SetDirty(this);
#endif
}
/// <summary>
/// Changes the active state of the page dots.
/// It deactivates the dot at the 'fromIndex' and activates the dot at the 'toIndex'.
/// </summary>
/// <param name="fromIndex">The index of the dot to deactivate.</param>
/// <param name="toIndex">The index of the dot to activate.</param>
public void ChangeActiveDot(int fromIndex, int toIndex)
{
_dots[fromIndex].ChangeActiveState(false);
_dots[toIndex].ChangeActiveState(true);
}
#if UNITY_EDITOR
[CustomEditor(typeof(PageDotsIndicator))]
public class PageDotsIndicatorEditor : Editor
{
#region Variables
private PageDotsIndicator _target;
#endregion
private void OnEnable()
{
_target = (PageDotsIndicator)target;
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.Space();
EditorGUILayout.LabelField("Editor");
if (GUILayout.Button("Clear"))
{
_target.Clear();
}
}
}
#endif
}
}

View File

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

View File

@ -0,0 +1,267 @@
#region Includes
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;
#endregion
namespace TS.PageSlider
{
/// <summary>
/// The PageScroller class manages scrolling within a PageSlider component.
/// It handles user interaction for swiping between pages and snapping to the closest page on release.
/// </summary>
public class PageScroller : MonoBehaviour, IBeginDragHandler, IEndDragHandler
{
#region Variables
[Header("Configuration")]
/// <summary>
/// Minimum delta drag required to consider a page change (normalized value between 0 and 1).
/// </summary>
[Tooltip("Minimum delta drag required to consider a page change (normalized value between 0 and 1)")]
[SerializeField] private float _minDeltaDrag = 0.1f;
/// <summary>
/// Duration (in seconds) for the page snapping animation.
/// </summary>
[Tooltip("Duration (in seconds) for the page snapping animation")]
[SerializeField] private float _snapDuration = 0.3f;
[Header("Events")]
/// <summary>
/// Event triggered when a page change starts.
/// The event arguments are the index of the current page and the index of the target page.
/// </summary>
[Tooltip("Event triggered when a page change starts: index current page, index of target page")]
public UnityEvent<int, int> OnPageChangeStarted;
/// <summary>
/// Event triggered when a page change ends.
/// The event arguments are the index of the current page and the index of the new active page.
/// </summary>
[Tooltip("Event triggered when a page change ends: index of the current page, index of the new active page")]
public UnityEvent<int, int> OnPageChangeEnded;
/// <summary>
/// Gets the rectangle of the ScrollRect component used for scrolling.
/// </summary>
public Rect Rect
{
get
{
#if UNITY_EDITOR
if (_scrollRect == null)
{
_scrollRect = FindScrollRect();
}
#endif
return ((RectTransform)_scrollRect.transform).rect;
}
}
/// <summary>
/// Gets the RectTransform of the content being scrolled within the ScrollRect.
/// </summary>
public RectTransform Content
{
get
{
#if UNITY_EDITOR
if (_scrollRect == null)
{
_scrollRect = FindScrollRect();
}
#endif
return _scrollRect.content;
}
}
private ScrollRect _scrollRect;
private int _currentPage; // Index of the currently active page.
private int _targetPage; // Index of the target page during a page change animation.
private float _startNormalizedPosition; // Normalized position of the scroll bar when drag begins.
private float _targetNormalizedPosition; // Normalized position of the scroll bar for the target page.
private float _moveSpeed; // Speed of the scroll bar animation (normalized units per second).
#endregion
private void Awake()
{
_scrollRect = FindScrollRect();
}
private void Update()
{
// If there's no movement in progress (moveSpeed is 0), exit the function early.
if (_moveSpeed == 0) { return; }
// Get the current normalized position of the scroll rect (between 0 and 1).
// Update the current position based on the move speed and deltaTime.
var position = _scrollRect.horizontalNormalizedPosition;
position += _moveSpeed * Time.deltaTime;
// Determine the minimum and maximum allowed positions based on the move direction:
// - If moving forward (positive moveSpeed): current position is the minimum, target position is the maximum.
// - If moving backward (negative moveSpeed): current position is the maximum, target position is the minimum.
// Clamp the current position to stay within the valid range (between min and max).
var min = _moveSpeed > 0 ? position : _targetNormalizedPosition;
var max = _moveSpeed > 0 ? _targetNormalizedPosition : position;
position = Mathf.Clamp(position, min, max);
// Update the actual position of the scroll rect in the ScrollRect component.
_scrollRect.horizontalNormalizedPosition = position;
// Check if the scroll rect has reached the target position (within a small tolerance using Mathf.Epsilon).
if (Mathf.Abs(_targetNormalizedPosition - position) < Mathf.Epsilon)
{
// Stop the movement by setting moveSpeed to 0.
_moveSpeed = 0;
// Invoke the OnPageChangeEnded event to signal the completion of the page change animation.
// The event arguments are the index of the previous page and the index of the new active page.
OnPageChangeEnded?.Invoke(_currentPage, _targetPage);
// Update the _currentPage variable to reflect the new active page.
_currentPage = _targetPage;
}
}
public void SetPage(int index)
{
_scrollRect.horizontalNormalizedPosition = GetTargetPagePosition(index);
_targetPage = index;
_currentPage = index;
OnPageChangeEnded?.Invoke(0, _currentPage);
}
public void OnBeginDrag(PointerEventData eventData)
{
// Store the starting normalized position of the scroll bar.
_startNormalizedPosition = _scrollRect.horizontalNormalizedPosition;
// Check if the target page is different from the current page.
if (_targetPage != _currentPage)
{
// If they are different, it means we were potentially in the middle of an animation
// for a previous page change that got interrupted by this drag.
// Therefore, signal the end of the previous page change animation (if any)
// by invoking the OnPageChangeEnded event.
// The event arguments are the index of the previous page (_currentPage)
// and the index of the target page (_targetPage).
OnPageChangeEnded?.Invoke(_currentPage, _targetPage);
// Update the _currentPage variable to reflect the target page,
// as this is now the intended page after the drag begins.
_currentPage = _targetPage;
}
// Reset the move speed to 0 to stop any ongoing scroll animations.
// This is necessary because a drag interaction might interrupt an ongoing page change animation.
_moveSpeed = 0;
}
public void OnEndDrag(PointerEventData eventData)
{
// Calculate the width of a single page (normalized value between 0 and 1).
// This is achieved by dividing 1 by the total number of pages.
var pageWidth = 1f / GetPageCount();
// Calculate the normalized position of the current page.
// When snapping to a page, this position should ideally match the starting normalized position.
var pagePosition = _currentPage * pageWidth;
// Get the current normalized position of the scroll rect.
var currentPosition = _scrollRect.horizontalNormalizedPosition;
// Determine the minimum amount of drag required (normalized value) to consider a page change.
// This is calculated by multiplying the page width by the _minDeltaDrag value.
var minPageDrag = pageWidth * _minDeltaDrag;
// Check if the drag direction is forward or backward.
// This is determined by comparing the current position with the starting position.
// A higher current position indicates a forward drag.
var isForwardDrag = _scrollRect.horizontalNormalizedPosition > _startNormalizedPosition;
// Calculate the normalized position where a page change should occur (switchPageBreakpoint).
// This is calculated by adding (for forward drag) or subtracting (for backward drag)
// the minimum page drag distance from the current page position.
var switchPageBreakpoint = pagePosition + (isForwardDrag ? minPageDrag : -minPageDrag);
// Determine if a page change should occur based on the current position and the switchPageBreakpoint.
// If it's a forward drag and the current position is greater than the switchPageBreakpoint,
// it means the user has dragged enough to switch to the next page.
// Similarly, for a backward drag, if the current position is less than the switchPageBreakpoint,
// a page change to the previous page is triggered.
var page = _currentPage;
if (isForwardDrag && currentPosition > switchPageBreakpoint)
{
page++;
}
else if (!isForwardDrag && currentPosition < switchPageBreakpoint)
{
page--;
}
// Call the ScrollToPage function to initiate the page change animation for the determined page.
ScrollToPage(page);
}
/// <summary>
/// This function handles initiating a page change animation based on a target page index
/// during a scroll interaction. It calculates the target scroll position, determines if a page change
/// is required based on drag distance and direction, and triggers the animation if necessary.
/// </summary>
/// <param name="page">The index of the target page to scroll to.</param>
private void ScrollToPage(int page)
{
// Calculate the target normalized position for the scroll rect based on the target page index.
_targetNormalizedPosition = GetTargetPagePosition(page);
// Calculate the speed required to reach the target position within the snap duration.
_moveSpeed = (_targetNormalizedPosition - _scrollRect.horizontalNormalizedPosition) / _snapDuration;
// Update the target page variable to reflect the new target page.
_targetPage = page;
// If the target page is different from the current page,
// invoke the OnPageChangeStarted event to signal the beginning of the page change animation.
if (_targetPage != _currentPage)
{
OnPageChangeStarted?.Invoke(_currentPage, _targetPage);
}
}
/// <summary>
/// Calculates the number of scrollable pages in the scroll view, considering the content and viewport width.
/// </summary>
/// <returns>The number of scrollable pages.</returns>
private int GetPageCount()
{
var contentWidth = _scrollRect.content.rect.width;
var rectWidth = ((RectTransform)_scrollRect.transform).rect.size.x;
return Mathf.RoundToInt(contentWidth / rectWidth) - 1;
}
private float GetTargetPagePosition(int page)
{
return page * (1f / GetPageCount());
}
private ScrollRect FindScrollRect()
{
var scrollRect = GetComponentInChildren<ScrollRect>();
#if UNITY_EDITOR || DEVELOPMENT_BUILD
if (scrollRect == null)
{
Debug.LogError("Missing ScrollRect in Children");
}
#endif
return scrollRect;
}
}
}

View File

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

View File

@ -0,0 +1,243 @@
#region Includes
using UnityEngine;
using UnityEngine.Events;
using System.Collections.Generic;
using System.Collections;
#endregion
#if UNITY_EDITOR
using UnityEditor;
#endif
namespace TS.PageSlider
{
/// <summary>
/// The PageSlider class manages a collection of pages within a PageScroller component.
/// It provides functionality for adding, removing, and keeping track of pages,
/// as well as handling page change events.
/// </summary>
public class PageSlider : MonoBehaviour
{
#region Variables
[Header("References")]
/// <summary>
/// "An optional reference to a PageDotsIndicator component used to display dots for each page."
/// </summary>
[Tooltip("Optional reference to a PageDotsIndicator to display dots for each page")]
[SerializeField] private PageDotsIndicator _dotsIndicator;
[Header("Children")]
/// <summary>
/// A list of PageContainer components representing the pages managed by the PageSlider.
/// </summary>
[Tooltip("A list of PageContainer components representing the pages managed by the PageSlider")]
[SerializeField] private List<PageContainer> _pages;
[Header("Configuration")]
/// <summary>
/// The index of the page to show at start.
/// </summary>
[Tooltip("The index of the page to show at start")]
[SerializeField] private int _startPageIndex;
[Header("Events")]
/// <summary>
/// Invoked whenever the active page changes.
/// The event argument is a reference to the new active page.
/// </summary>
public UnityEvent<PageContainer> OnPageChanged;
/// <summary>
/// Gets the rectangle of the PageSlider component.
/// </summary>
public Rect Rect { get { return ((RectTransform)transform).rect; } }
private PageScroller _scroller;
#endregion
private void Awake()
{
_scroller = FindScroller();
}
private IEnumerator Start()
{
_scroller.OnPageChangeStarted.AddListener(PageScroller_PageChangeStarted);
_scroller.OnPageChangeEnded.AddListener(PageScroller_PageChangeEnded);
yield return new WaitForEndOfFrame();
if (_startPageIndex == 0) yield break;
_scroller.SetPage(_startPageIndex);
}
/// <summary>
/// Adds a new page to the PageSlider.
/// The content argument specifies the RectTransform of the content to be displayed on the new page.
/// </summary>
/// <param name="content">The RectTransform of the content to be displayed on the new page.</param>
public void AddPage(RectTransform content)
{
if (_scroller == null)
{
_scroller = FindScroller();
}
// Initialize the pages list if it's null (first page).
_pages ??= new List<PageContainer>();
// Create a new GameObject for the page with a descriptive name.
// Set the page's parent to the scroller's content transform.
var page = new GameObject(string.Format("Page_{0}", _pages.Count), typeof(RectTransform), typeof(PageContainer));
page.transform.SetParent(_scroller.Content);
// Get the RectTransform component of the newly created page.
// Set the size of the page's RectTransform to match the size of the scroller's viewport.
// Set the page's local scale to one (no scaling).
var rectTransform = page.GetComponent<RectTransform>();
rectTransform.sizeDelta = _scroller.Rect.size;
rectTransform.localScale = Vector3.one;
// Get the PageContainer component from the page GameObject.
// Assign the provided content (RectTransform) to the PageContainer.
var pageView = page.GetComponent<PageContainer>();
pageView.AssignContent(content);
// If this is the first page, trigger its activation state change.
if (_pages.Count == 0)
{
pageView.ChangingToActiveState();
pageView.ChangeActiveState(true);
}
// Add the newly created page container to the internal list.
_pages.Add(pageView);
// If a dots indicator is assigned, add a new dot and update its visibility based on the number of pages.
if (_dotsIndicator != null)
{
_dotsIndicator.Add();
_dotsIndicator.IsVisible = _pages.Count > 1;
}
#if UNITY_EDITOR
// In editor mode, mark the scene as dirty to save changes.
if (Application.isPlaying) { return; }
EditorUtility.SetDirty(this);
#endif
}
/// <summary>
/// Removes all pages from the PageSlider and clears the associated PageDotsIndicator (if exists).
/// </summary>
public void Clear()
{
for (int i = 0; i < _pages.Count; i++)
{
if (_pages[i] == null) { continue; }
#if UNITY_EDITOR
DestroyImmediate(_pages[i].gameObject);
#else
Destroy(_pages[i].gameObject);
#endif
}
_pages.Clear();
if (_dotsIndicator != null)
{
_dotsIndicator.Clear();
}
}
/// <summary>
/// Called by the PageScroller component when a page change starts.
/// Deactivates the page at the fromIndex and activates the page at the toIndex.
/// </summary>
/// <param name="fromIndex">The index of the page that is being deactivated.</param>
/// <param name="toIndex">The index of the page that is being activated.</param>
private void PageScroller_PageChangeStarted(int fromIndex, int toIndex)
{
_pages[fromIndex].ChangingToInactiveState();
_pages[toIndex].ChangingToActiveState();
}
/// <summary>
/// Called by the PageScroller component when a page change ends. Sets the page at the fromIndex to inactive and the page at the toIndex to active. Updates the PageDotsIndicator and invokes the OnPageChanged event.
/// </summary>
/// <param name="fromIndex">The index of the page that is being deactivated.</param>
/// <param name="toIndex">The index of the page that is being activated.</param>
private void PageScroller_PageChangeEnded(int fromIndex, int toIndex)
{
_pages[fromIndex].ChangeActiveState(false);
_pages[toIndex].ChangeActiveState(true);
if (_dotsIndicator != null)
{
_dotsIndicator.ChangeActiveDot(fromIndex, toIndex);
}
OnPageChanged?.Invoke(_pages[toIndex]);
}
/// <summary>
/// Finds the PageScroller component within the children of the gameobject this script is attached to.
/// </summary>
/// <returns>The PageScroller component found in the children, or null if not found.</returns>
private PageScroller FindScroller()
{
var scroller = GetComponentInChildren<PageScroller>();
#if UNITY_EDITOR || DEVELOPMENT_BUILD
if (scroller == null)
{
Debug.LogError("Missing PageScroller in Children");
}
#endif
return scroller;
}
#if UNITY_EDITOR
[CustomEditor(typeof(PageSlider))]
public class PageControllerEditor : Editor
{
#region Variables
private PageSlider _target;
private RectTransform _contentPrefab;
#endregion
private void OnEnable()
{
_target = (PageSlider)target;
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.Space();
EditorGUILayout.LabelField("Editor");
_contentPrefab = (RectTransform)EditorGUILayout.ObjectField(_contentPrefab, typeof(RectTransform), false);
if (GUILayout.Button("Add Page"))
{
_target.AddPage((RectTransform)PrefabUtility.InstantiatePrefab(_contentPrefab));
}
if (GUILayout.Button("Clear"))
{
_target.Clear();
}
}
}
#endif
}
}

View File

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

View File

@ -0,0 +1,64 @@
#region Includes
using UnityEngine;
using UnityEngine.Events;
#endregion
namespace TS.PageSlider
{
/// <summary>
/// This class represents a view or page within a paginated view system.
/// It provides events to signal changes in the active state of the page.
/// </summary>
public class PageView : MonoBehaviour
{
#region Variables
[Header("Events")]
/// <summary>
/// UnityEvent that is invoked when the page is about to transition to the active state.
/// </summary>
[Tooltip("Invoked when the page is about to transition to the active state")]
public UnityEvent OnChangingToActiveState;
/// <summary>
/// UnityEvent that is invoked when the page is about to transition to the inactive state.
/// </summary>
[Tooltip("Invoked when the page is about to transition to the inactive state")]
public UnityEvent OnChangingToInactiveState;
/// <summary>
/// UnityEvent with a boolean parameter that is invoked when the active state of the page changes.
/// The parameter is True if the page becomes active, False if it becomes inactive.
/// </summary>
[Tooltip("Invoked when the active state of the page changes: True when active and False when inactive")]
public UnityEvent<bool> OnActiveStateChanged;
#endregion
/// <summary>
/// Invokes the OnChangingToActiveState event to signal that the page is about to become active.
/// </summary>
public void ChangingToActiveState()
{
OnChangingToActiveState?.Invoke();
}
/// <summary>
/// Invokes the OnChangingToInactiveState event to signal that the page is about to become inactive.
/// </summary>
public void ChangingToInactiveState()
{
OnChangingToInactiveState?.Invoke();
}
/// <summary>
/// Invokes the OnActiveStateChanged event with the provided active state.
/// </summary>
/// <param name="active">True to signal the page becoming active, False for inactive.</param>
public void ChangeActiveState(bool active)
{
OnActiveStateChanged?.Invoke(active);
}
}
}

View File

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