| @@ -0,0 +1,18 @@ | ||
| using UnityEngine.EventSystems; | ||
|
|
||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class PaginationScript : MonoBehaviour, IPointerClickHandler | ||
| { | ||
| public HorizontalScrollSnap hss; | ||
| public int Page; | ||
|
|
||
| public void OnPointerClick(PointerEventData eventData) | ||
| { | ||
| if (hss != null) | ||
| { | ||
| hss.GoToScreen(Page); | ||
| } | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,80 @@ | ||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class UpdateScrollSnap : MonoBehaviour | ||
| { | ||
|
|
||
| public UnityEngine.UI.Extensions.HorizontalScrollSnap HSS; | ||
| public UnityEngine.UI.Extensions.VerticalScrollSnap VSS; | ||
| public GameObject HorizontalPagePrefab; | ||
| public GameObject VerticalPagePrefab; | ||
| public UnityEngine.UI.InputField JumpPage; | ||
|
|
||
|
|
||
| public void AddButton() | ||
| { | ||
| if (HSS) | ||
| { | ||
| var newHSSPage = GameObject.Instantiate(HorizontalPagePrefab); | ||
| HSS.AddChild(newHSSPage); | ||
| } | ||
| if (VSS) | ||
| { | ||
| var newVSSPage = GameObject.Instantiate(VerticalPagePrefab); | ||
| VSS.AddChild(newVSSPage); | ||
| } | ||
| } | ||
|
|
||
| public void RemoveButton() | ||
| { | ||
| GameObject removed, removed2; | ||
| if (HSS) | ||
| { | ||
| HSS.RemoveChild(HSS.CurrentPage, out removed); | ||
| removed.SetActive(false); | ||
| } | ||
| if (VSS) | ||
| { | ||
| VSS.RemoveChild(VSS.CurrentPage, out removed2); | ||
| removed2.SetActive(false); | ||
| } | ||
| } | ||
|
|
||
| public void JumpToPage() | ||
| { | ||
| int jumpPage = int.Parse(JumpPage.text); | ||
| if (HSS) | ||
| { | ||
| HSS.GoToScreen(jumpPage); | ||
| } | ||
| if (VSS) | ||
| { | ||
| VSS.GoToScreen(jumpPage); | ||
| } | ||
| } | ||
|
|
||
| public void SelectionStartChange() | ||
| { | ||
| Debug.Log("Scroll Snap change started"); | ||
| } | ||
| public void SelectionEndChange() | ||
| { | ||
| Debug.Log("Scroll Snap change finished"); | ||
| } | ||
| public void PageChange(int page) | ||
| { | ||
| Debug.Log(string.Format("Scroll Snap page changed to {0}", page)); | ||
| } | ||
|
|
||
| public void RemoveAll() | ||
| { | ||
| GameObject[] children; | ||
| HSS.RemoveAllChildren(out children); | ||
| VSS.RemoveAllChildren(out children); | ||
| } | ||
|
|
||
| public void JumpToSelectedToggle(int page) | ||
| { | ||
| HSS.GoToScreen(page); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,156 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1 &119482 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 5 | ||
| m_Component: | ||
| - component: {fileID: 22453320} | ||
| - component: {fileID: 22289442} | ||
| - component: {fileID: 11441860} | ||
| m_Layer: 5 | ||
| m_Name: Text | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!1 &199866 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 5 | ||
| m_Component: | ||
| - component: {fileID: 22436078} | ||
| - component: {fileID: 22286906} | ||
| - component: {fileID: 11405786} | ||
| m_Layer: 5 | ||
| m_Name: Vertical_Page_Prefab | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!114 &11405786 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 199866} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: 1, g: 1, b: 1, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | ||
| Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_Sprite: {fileID: 10905, 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 | ||
| --- !u!114 &11441860 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 119482} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: 0.196, g: 0.196, b: 0.196, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | ||
| Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_FontData: | ||
| m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} | ||
| m_FontSize: 14 | ||
| m_FontStyle: 0 | ||
| m_BestFit: 0 | ||
| m_MinSize: 10 | ||
| m_MaxSize: 40 | ||
| m_Alignment: 4 | ||
| m_AlignByGeometry: 0 | ||
| m_RichText: 1 | ||
| m_HorizontalOverflow: 0 | ||
| m_VerticalOverflow: 0 | ||
| m_LineSpacing: 1 | ||
| m_Text: Page_Prefab | ||
| --- !u!222 &22286906 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 199866} | ||
| --- !u!222 &22289442 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 119482} | ||
| --- !u!224 &22436078 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 199866} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: | ||
| - {fileID: 22453320} | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | ||
| m_AnchorMin: {x: 0.5, y: 0} | ||
| m_AnchorMax: {x: 0.5, y: 0} | ||
| m_AnchoredPosition: {x: 0, y: 0} | ||
| m_SizeDelta: {x: 100, y: 100} | ||
| m_Pivot: {x: 0.5, y: 0} | ||
| --- !u!224 &22453320 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 119482} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 22436078} | ||
| m_RootOrder: 0 | ||
| m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | ||
| m_AnchorMin: {x: 0.5, y: 0.5} | ||
| m_AnchorMax: {x: 0.5, y: 0.5} | ||
| m_AnchoredPosition: {x: 0, y: 0} | ||
| m_SizeDelta: {x: 100, y: 100} | ||
| m_Pivot: {x: 0.5, y: 0.5} | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: [] | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 199866} | ||
| m_IsPrefabParent: 1 |
| @@ -0,0 +1,343 @@ | ||
| %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: 8 | ||
| 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: 3 | ||
| m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} | ||
| m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, a: 1} | ||
| --- !u!157 &3 | ||
| LightmapSettings: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 9 | ||
| m_GIWorkflowMode: 1 | ||
| m_GISettings: | ||
| serializedVersion: 2 | ||
| m_BounceScale: 1 | ||
| m_IndirectOutputScale: 1 | ||
| m_AlbedoBoost: 1 | ||
| m_TemporalCoherenceThreshold: 1 | ||
| m_EnvironmentLightingMode: 0 | ||
| m_EnableBakedLightmaps: 0 | ||
| m_EnableRealtimeLightmaps: 0 | ||
| m_LightmapEditorSettings: | ||
| serializedVersion: 8 | ||
| m_Resolution: 2 | ||
| m_BakeResolution: 40 | ||
| m_TextureWidth: 1024 | ||
| m_TextureHeight: 1024 | ||
| m_AO: 0 | ||
| m_AOMaxDistance: 1 | ||
| m_CompAOExponent: 1 | ||
| m_CompAOExponentDirect: 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: 1 | ||
| m_BakeBackend: 0 | ||
| m_PVRSampling: 1 | ||
| m_PVRDirectSampleCount: 32 | ||
| m_PVRSampleCount: 500 | ||
| m_PVRBounces: 2 | ||
| m_PVRFiltering: 0 | ||
| m_PVRFilteringMode: 1 | ||
| m_PVRCulling: 1 | ||
| m_PVRFilteringGaussRadiusDirect: 1 | ||
| m_PVRFilteringGaussRadiusIndirect: 5 | ||
| m_PVRFilteringGaussRadiusAO: 2 | ||
| m_PVRFilteringAtrousColorSigma: 1 | ||
| m_PVRFilteringAtrousNormalSigma: 1 | ||
| m_PVRFilteringAtrousPositionSigma: 1 | ||
| m_LightingDataAsset: {fileID: 0} | ||
| m_ShadowMaskMode: 2 | ||
| --- !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 | ||
| m_NavMeshData: {fileID: 0} | ||
| --- !u!1 &921941878 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| serializedVersion: 5 | ||
| m_Component: | ||
| - component: {fileID: 921941881} | ||
| - component: {fileID: 921941880} | ||
| - component: {fileID: 921941879} | ||
| m_Layer: 0 | ||
| m_Name: EventSystem | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!114 &921941879 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 921941878} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_HorizontalAxis: Horizontal | ||
| m_VerticalAxis: Vertical | ||
| m_SubmitButton: Submit | ||
| m_CancelButton: Cancel | ||
| m_InputActionsPerSecond: 10 | ||
| m_RepeatDelay: 0.5 | ||
| m_ForceModuleActive: 0 | ||
| --- !u!114 &921941880 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 921941878} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_FirstSelected: {fileID: 0} | ||
| m_sendNavigationEvents: 1 | ||
| m_DragThreshold: 5 | ||
| --- !u!4 &921941881 | ||
| Transform: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 921941878} | ||
| m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 1 | ||
| m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | ||
| --- !u!1001 &1348309701 | ||
| Prefab: | ||
| m_ObjectHideFlags: 0 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: | ||
| - target: {fileID: 114785289659472098, guid: f0f89c3fccbfa4bddbac45ae1effe466, | ||
| type: 2} | ||
| propertyPath: MenuScreens.Array.size | ||
| value: 5 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 4108131592329822, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| propertyPath: m_LocalPosition.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 4108131592329822, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| propertyPath: m_LocalPosition.y | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 4108131592329822, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| propertyPath: m_LocalPosition.z | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 4108131592329822, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| propertyPath: m_LocalRotation.x | ||
| value: -0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 4108131592329822, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| propertyPath: m_LocalRotation.y | ||
| value: -0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 4108131592329822, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| propertyPath: m_LocalRotation.z | ||
| value: -0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 4108131592329822, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| propertyPath: m_LocalRotation.w | ||
| value: 1 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 4108131592329822, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| propertyPath: m_RootOrder | ||
| value: 2 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 114785289659472098, guid: f0f89c3fccbfa4bddbac45ae1effe466, | ||
| type: 2} | ||
| propertyPath: MenuScreens.Array.data[0] | ||
| value: | ||
| objectReference: {fileID: 114026954515301400, guid: e9be8b59801ec4bbe829f57f7b2b9d88, | ||
| type: 2} | ||
| - target: {fileID: 114785289659472098, guid: f0f89c3fccbfa4bddbac45ae1effe466, | ||
| type: 2} | ||
| propertyPath: MenuScreens.Array.data[1] | ||
| value: | ||
| objectReference: {fileID: 114359196589700260, guid: 5617592ee912047459b98264a09ddb8a, | ||
| type: 2} | ||
| - target: {fileID: 114785289659472098, guid: f0f89c3fccbfa4bddbac45ae1effe466, | ||
| type: 2} | ||
| propertyPath: MenuScreens.Array.data[2] | ||
| value: | ||
| objectReference: {fileID: 114412859951304140, guid: 85d45cc7dbcc7490b91c0aa61f4e73c2, | ||
| type: 2} | ||
| - target: {fileID: 114785289659472098, guid: f0f89c3fccbfa4bddbac45ae1effe466, | ||
| type: 2} | ||
| propertyPath: MenuScreens.Array.data[3] | ||
| value: | ||
| objectReference: {fileID: 114109697501719388, guid: 11104fd9ff8884a49b96b0d3d0accb5c, | ||
| type: 2} | ||
| - target: {fileID: 114785289659472098, guid: f0f89c3fccbfa4bddbac45ae1effe466, | ||
| type: 2} | ||
| propertyPath: MenuScreens.Array.data[4] | ||
| value: | ||
| objectReference: {fileID: 114030211315693384, guid: 5f7dc93bebf1e41e280baafd8eaa59ec, | ||
| type: 2} | ||
| - target: {fileID: 114785289659472098, guid: f0f89c3fccbfa4bddbac45ae1effe466, | ||
| type: 2} | ||
| propertyPath: StartScreen | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 100100000, guid: f0f89c3fccbfa4bddbac45ae1effe466, type: 2} | ||
| m_IsPrefabParent: 0 | ||
| --- !u!1 &1536790856 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| serializedVersion: 5 | ||
| m_Component: | ||
| - component: {fileID: 1536790861} | ||
| - component: {fileID: 1536790860} | ||
| - component: {fileID: 1536790859} | ||
| - component: {fileID: 1536790858} | ||
| - component: {fileID: 1536790857} | ||
| 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 &1536790857 | ||
| AudioListener: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1536790856} | ||
| m_Enabled: 1 | ||
| --- !u!124 &1536790858 | ||
| Behaviour: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1536790856} | ||
| m_Enabled: 1 | ||
| --- !u!92 &1536790859 | ||
| Behaviour: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1536790856} | ||
| m_Enabled: 1 | ||
| --- !u!20 &1536790860 | ||
| Camera: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1536790856} | ||
| m_Enabled: 1 | ||
| serializedVersion: 2 | ||
| m_ClearFlags: 1 | ||
| m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} | ||
| 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: 1 | ||
| 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: 0 | ||
| m_AllowMSAA: 1 | ||
| m_ForceIntoRT: 0 | ||
| m_OcclusionCulling: 1 | ||
| m_StereoConvergence: 10 | ||
| m_StereoSeparation: 0.022 | ||
| m_StereoMirrorMode: 0 | ||
| --- !u!4 &1536790861 | ||
| Transform: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 0} | ||
| m_GameObject: {fileID: 1536790856} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: -10} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| @@ -0,0 +1,55 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: [] | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 1606545965997528} | ||
| m_IsPrefabParent: 1 | ||
| --- !u!1 &1606545965997528 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 5 | ||
| m_Component: | ||
| - component: {fileID: 4108131592329822} | ||
| - component: {fileID: 114785289659472098} | ||
| m_Layer: 0 | ||
| m_Name: MenuManager | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!4 &4108131592329822 | ||
| Transform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 1606545965997528} | ||
| m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} | ||
| --- !u!114 &114785289659472098 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 1606545965997528} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 11500000, guid: adf0efbc9d5b148979111e50bec1893f, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| MainMenu: {fileID: 0} | ||
| Menus: [] |
| @@ -0,0 +1,21 @@ | ||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class AwesomeMenu : Menu<AwesomeMenu> | ||
| { | ||
| public Image Background; | ||
| public Text Title; | ||
|
|
||
| public static void Show(float awesomeness) | ||
| { | ||
| Open(); | ||
|
|
||
| Instance.Background.color = new Color32((byte)(129 * awesomeness), (byte)(197 * awesomeness), (byte)(34 * awesomeness), 255); | ||
| Instance.Title.text = string.Format("This menu is {0:P} awesome", awesomeness); | ||
| } | ||
|
|
||
| public static void Hide() | ||
| { | ||
| Close(); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,10 @@ | ||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class GameMenu : SimpleMenu<GameMenu> | ||
| { | ||
| public override void OnBackPressed() | ||
| { | ||
| PauseMenu.Show(); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,20 @@ | ||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class MainMenu : SimpleMenu<MainMenu> | ||
| { | ||
| public void OnPlayPressed() | ||
| { | ||
| GameMenu.Show(); | ||
| } | ||
|
|
||
| public void OnOptionsPressed() | ||
| { | ||
| OptionsMenu.Show(); | ||
| } | ||
|
|
||
| public override void OnBackPressed() | ||
| { | ||
| Application.Quit(); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,12 @@ | ||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class OptionsMenu : SimpleMenu<OptionsMenu> | ||
| { | ||
| public Slider Slider; | ||
|
|
||
| public void OnMagicButtonPressed() | ||
| { | ||
| AwesomeMenu.Show(Slider.value); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,13 @@ | ||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class PauseMenu : SimpleMenu<PauseMenu> | ||
| { | ||
| public void OnQuitPressed() | ||
| { | ||
| Hide(); | ||
| Destroy(this.gameObject); // This menu does not automatically destroy itself | ||
|
|
||
| GameMenu.Hide(); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,29 @@ | ||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class UpdateRadialValue : MonoBehaviour | ||
| { | ||
| public InputField input; | ||
| public RadialSlider slider; | ||
|
|
||
| // Use this for initialization | ||
| void Start() | ||
| { | ||
|
|
||
| } | ||
|
|
||
| // Update is called once per frame | ||
| public void UpdateSliderValue() | ||
| { | ||
| float value; | ||
| float.TryParse(input.text, out value); | ||
| slider.Value = value; | ||
| } | ||
|
|
||
| public void UpdateSliderAndle() | ||
| { | ||
| int value; | ||
| int.TryParse(input.text, out value); | ||
| slider.Angle = value; | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,51 @@ | ||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class AnimateEffects : MonoBehaviour | ||
| { | ||
| public LetterSpacing letterSpacing; | ||
| float letterSpacingMax = 10, letterSpacingMin = -10, letterSpacingModifier = 0.1f; | ||
| public CurvedText curvedText; | ||
| float curvedTextMax = 0.05f, curvedTextMin = -0.05f, curvedTextModifier = 0.001f; | ||
| public Gradient2 gradient2; | ||
| float gradient2Max = 1, gradient2Min = -1, gradient2Modifier = 0.01f; | ||
| public CylinderText cylinderText; | ||
| private Transform cylinderTextRT; | ||
| Vector3 cylinderRotation = new Vector3(0, 1, 0); | ||
| public SoftMaskScript SAUIM; | ||
| float SAUIMMax = 1, SAUIMMin = 0, SAUIMModifier = 0.01f; | ||
| // Use this for initialization | ||
| void Start() | ||
| { | ||
| cylinderTextRT = cylinderText.GetComponent<Transform>(); | ||
| } | ||
|
|
||
| // Update is called once per frame | ||
| void Update() | ||
| { | ||
| letterSpacing.spacing += letterSpacingModifier; | ||
| if (letterSpacing.spacing > letterSpacingMax || letterSpacing.spacing < letterSpacingMin) | ||
| { | ||
| letterSpacingModifier = -letterSpacingModifier; | ||
| } | ||
| curvedText.CurveMultiplier += curvedTextModifier; | ||
| if (curvedText.CurveMultiplier > curvedTextMax || curvedText.CurveMultiplier < curvedTextMin) | ||
| { | ||
| curvedTextModifier = -curvedTextModifier; | ||
| } | ||
| gradient2.Offset += gradient2Modifier; | ||
| if (gradient2.Offset > gradient2Max || gradient2.Offset < gradient2Min) | ||
| { | ||
| gradient2Modifier = -gradient2Modifier; | ||
| } | ||
|
|
||
| cylinderTextRT.Rotate(cylinderRotation); | ||
|
|
||
| SAUIM.CutOff += SAUIMModifier; | ||
| if (SAUIM.CutOff > SAUIMMax || SAUIM.CutOff < SAUIMMin) | ||
| { | ||
| SAUIMModifier = -SAUIMModifier; | ||
| } | ||
|
|
||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,30 @@ | ||
| /// Credit playemgames | ||
| /// Sourced from - http://forum.unity3d.com/threads/sprite-icons-with-text-e-g-emoticons.265927/ | ||
|
|
||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class testHref : MonoBehaviour | ||
| { | ||
| public TextPic textPic; | ||
|
|
||
| void Awake() | ||
| { | ||
| textPic = GetComponent<TextPic>(); | ||
| } | ||
|
|
||
| void OnEnable() | ||
| { | ||
| textPic.onHrefClick.AddListener(OnHrefClick); | ||
| } | ||
|
|
||
| void OnDisable() | ||
| { | ||
| textPic.onHrefClick.RemoveListener(OnHrefClick); | ||
| } | ||
|
|
||
| private void OnHrefClick(string hrefName) | ||
| { | ||
| Debug.Log("Click on the " + hrefName); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,78 @@ | ||
| using System.Collections.Generic; | ||
|
|
||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| [RequireComponent(typeof(UILineRenderer))] | ||
| public class LineRendererOrbit : MonoBehaviour | ||
| { | ||
| UILineRenderer lr; | ||
| Circle circle; | ||
| public GameObject OrbitGO; | ||
| RectTransform orbitGOrt; | ||
| float orbitTime; | ||
|
|
||
| [SerializeField] | ||
| private float _xAxis = 3; | ||
|
|
||
| public float xAxis | ||
| { | ||
| get { return _xAxis; } | ||
| set { _xAxis = value; GenerateOrbit(); } | ||
| } | ||
|
|
||
| [SerializeField] | ||
| private float _yAxis = 3; | ||
|
|
||
| public float yAxis | ||
| { | ||
| get { return _yAxis; } | ||
| set { _yAxis = value; GenerateOrbit(); } | ||
| } | ||
|
|
||
| [SerializeField] | ||
| private int _steps = 10; | ||
|
|
||
| public int Steps | ||
| { | ||
| get { return _steps; } | ||
| set { _steps = value; GenerateOrbit(); } | ||
| } | ||
|
|
||
|
|
||
|
|
||
| // Use this for initialization | ||
| void Awake() | ||
| { | ||
| lr = GetComponent<UILineRenderer>(); | ||
| orbitGOrt = OrbitGO.GetComponent<RectTransform>(); | ||
| GenerateOrbit(); | ||
| } | ||
|
|
||
| // Update is called once per frame | ||
| void Update() | ||
| { | ||
| orbitTime = orbitTime > _steps ? orbitTime = 0 : orbitTime + Time.deltaTime; | ||
| orbitGOrt.localPosition = circle.Evaluate(orbitTime); | ||
| } | ||
|
|
||
| void GenerateOrbit() | ||
| { | ||
| circle = new Circle(xAxis: _xAxis, yAxis: _yAxis, steps: _steps); | ||
| List<Vector2> Points = new List<Vector2>(); | ||
| for (int i = 0; i < _steps; i++) | ||
| { | ||
| Points.Add(circle.Evaluate(i)); | ||
| } | ||
| Points.Add(circle.Evaluate(0)); | ||
| lr.Points = Points.ToArray(); | ||
| } | ||
|
|
||
| private void OnValidate() | ||
| { | ||
| if (lr != null) | ||
| { | ||
| GenerateOrbit(); | ||
| } | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,25 @@ | ||
| using System.Collections.Generic; | ||
|
|
||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class TestAddingPoints : MonoBehaviour | ||
| { | ||
| public UILineRenderer LineRenderer; | ||
| public Text XValue; | ||
| public Text YValue; | ||
|
|
||
| // Use this for initialization | ||
| public void AddNewPoint() | ||
| { | ||
| var point = new Vector2() { x = float.Parse(XValue.text), y = float.Parse(YValue.text) }; | ||
| var pointlist = new List<Vector2>(LineRenderer.Points); | ||
| pointlist.Add(point); | ||
| LineRenderer.Points = pointlist.ToArray(); | ||
| } | ||
|
|
||
| public void ClearPoints() | ||
| { | ||
| LineRenderer.Points = new Vector2[0]; | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,207 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1 &137556 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 224: {fileID: 22421816} | ||
| - 222: {fileID: 22220394} | ||
| - 114: {fileID: 11499114} | ||
| m_Layer: 5 | ||
| m_Name: Text | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!1 &138598 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 224: {fileID: 22453926} | ||
| - 222: {fileID: 22252292} | ||
| - 114: {fileID: 11415048} | ||
| - 114: {fileID: 11471022} | ||
| m_Layer: 5 | ||
| m_Name: DaysVertical | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!114 &11415048 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 138598} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: 1, g: 1, b: 1, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | ||
| Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_Sprite: {fileID: 10905, 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 | ||
| --- !u!114 &11471022 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 138598} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Navigation: | ||
| m_Mode: 3 | ||
| m_SelectOnUp: {fileID: 0} | ||
| m_SelectOnDown: {fileID: 0} | ||
| m_SelectOnLeft: {fileID: 0} | ||
| m_SelectOnRight: {fileID: 0} | ||
| m_Transition: 1 | ||
| m_Colors: | ||
| m_NormalColor: {r: 1, g: 1, b: 1, a: 1} | ||
| m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} | ||
| m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} | ||
| m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} | ||
| m_ColorMultiplier: 1 | ||
| m_FadeDuration: .100000001 | ||
| m_SpriteState: | ||
| m_HighlightedSprite: {fileID: 0} | ||
| m_PressedSprite: {fileID: 0} | ||
| m_DisabledSprite: {fileID: 0} | ||
| m_AnimationTriggers: | ||
| m_NormalTrigger: Normal | ||
| m_HighlightedTrigger: Highlighted | ||
| m_PressedTrigger: Pressed | ||
| m_DisabledTrigger: Disabled | ||
| m_Interactable: 1 | ||
| m_TargetGraphic: {fileID: 11415048} | ||
| m_OnClick: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, | ||
| Culture=neutral, PublicKeyToken=null | ||
| --- !u!114 &11499114 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 137556} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | ||
| Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_FontData: | ||
| m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} | ||
| m_FontSize: 14 | ||
| m_FontStyle: 0 | ||
| m_BestFit: 1 | ||
| m_MinSize: 10 | ||
| m_MaxSize: 40 | ||
| m_Alignment: 4 | ||
| m_RichText: 1 | ||
| m_HorizontalOverflow: 0 | ||
| m_VerticalOverflow: 0 | ||
| m_LineSpacing: 1 | ||
| m_Text: Button | ||
| --- !u!222 &22220394 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 137556} | ||
| --- !u!222 &22252292 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 138598} | ||
| --- !u!224 &22421816 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 137556} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 22453926} | ||
| m_RootOrder: 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: .5, y: .5} | ||
| --- !u!224 &22453926 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 138598} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: | ||
| - {fileID: 22421816} | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| m_AnchorMin: {x: 0, y: .5} | ||
| m_AnchorMax: {x: 1, y: .5} | ||
| m_AnchoredPosition: {x: 0, y: 0} | ||
| m_SizeDelta: {x: 0, y: 80} | ||
| m_Pivot: {x: .5, y: .5} | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: | ||
| - target: {fileID: 0} | ||
| propertyPath: m_SizeDelta.y | ||
| value: 80 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 0} | ||
| propertyPath: m_AnchoredPosition.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 0} | ||
| propertyPath: m_SizeDelta.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 138598} | ||
| m_IsPrefabParent: 1 |
| @@ -0,0 +1,207 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1 &139176 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 224: {fileID: 22488808} | ||
| - 222: {fileID: 22208232} | ||
| - 114: {fileID: 11466432} | ||
| m_Layer: 5 | ||
| m_Name: Text | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!1 &194106 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 224: {fileID: 22496698} | ||
| - 222: {fileID: 22250104} | ||
| - 114: {fileID: 11448172} | ||
| - 114: {fileID: 11464628} | ||
| m_Layer: 5 | ||
| m_Name: MonthsVertical | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!114 &11448172 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 194106} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: 1, g: 1, b: 1, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | ||
| Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_Sprite: {fileID: 10905, 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 | ||
| --- !u!114 &11464628 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 194106} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Navigation: | ||
| m_Mode: 3 | ||
| m_SelectOnUp: {fileID: 0} | ||
| m_SelectOnDown: {fileID: 0} | ||
| m_SelectOnLeft: {fileID: 0} | ||
| m_SelectOnRight: {fileID: 0} | ||
| m_Transition: 1 | ||
| m_Colors: | ||
| m_NormalColor: {r: 1, g: 1, b: 1, a: 1} | ||
| m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} | ||
| m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} | ||
| m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} | ||
| m_ColorMultiplier: 1 | ||
| m_FadeDuration: .100000001 | ||
| m_SpriteState: | ||
| m_HighlightedSprite: {fileID: 0} | ||
| m_PressedSprite: {fileID: 0} | ||
| m_DisabledSprite: {fileID: 0} | ||
| m_AnimationTriggers: | ||
| m_NormalTrigger: Normal | ||
| m_HighlightedTrigger: Highlighted | ||
| m_PressedTrigger: Pressed | ||
| m_DisabledTrigger: Disabled | ||
| m_Interactable: 1 | ||
| m_TargetGraphic: {fileID: 11448172} | ||
| m_OnClick: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, | ||
| Culture=neutral, PublicKeyToken=null | ||
| --- !u!114 &11466432 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 139176} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | ||
| Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_FontData: | ||
| m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} | ||
| m_FontSize: 14 | ||
| m_FontStyle: 0 | ||
| m_BestFit: 1 | ||
| m_MinSize: 10 | ||
| m_MaxSize: 40 | ||
| m_Alignment: 4 | ||
| m_RichText: 1 | ||
| m_HorizontalOverflow: 0 | ||
| m_VerticalOverflow: 0 | ||
| m_LineSpacing: 1 | ||
| m_Text: Button | ||
| --- !u!222 &22208232 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 139176} | ||
| --- !u!222 &22250104 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 194106} | ||
| --- !u!224 &22488808 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 139176} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 22496698} | ||
| m_RootOrder: 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: .5, y: .5} | ||
| --- !u!224 &22496698 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 194106} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: | ||
| - {fileID: 22488808} | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| m_AnchorMin: {x: 0, y: .5} | ||
| m_AnchorMax: {x: 1, y: .5} | ||
| m_AnchoredPosition: {x: 0, y: 0} | ||
| m_SizeDelta: {x: 0, y: 80} | ||
| m_Pivot: {x: .5, y: .5} | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: | ||
| - target: {fileID: 0} | ||
| propertyPath: m_SizeDelta.y | ||
| value: 80 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 0} | ||
| propertyPath: m_AnchoredPosition.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 0} | ||
| propertyPath: m_SizeDelta.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 194106} | ||
| m_IsPrefabParent: 1 |
| @@ -0,0 +1,207 @@ | ||
| %YAML 1.1 | ||
| %TAG !u! tag:unity3d.com,2011: | ||
| --- !u!1 &118010 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 224: {fileID: 22496654} | ||
| - 222: {fileID: 22201990} | ||
| - 114: {fileID: 11434666} | ||
| - 114: {fileID: 11483478} | ||
| m_Layer: 5 | ||
| m_Name: YearsVertical | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!1 &154304 | ||
| GameObject: | ||
| m_ObjectHideFlags: 0 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| serializedVersion: 4 | ||
| m_Component: | ||
| - 224: {fileID: 22441182} | ||
| - 222: {fileID: 22293210} | ||
| - 114: {fileID: 11490688} | ||
| m_Layer: 5 | ||
| m_Name: Text | ||
| m_TagString: Untagged | ||
| m_Icon: {fileID: 0} | ||
| m_NavMeshLayer: 0 | ||
| m_StaticEditorFlags: 0 | ||
| m_IsActive: 1 | ||
| --- !u!114 &11434666 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 118010} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: 1, g: 1, b: 1, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | ||
| Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_Sprite: {fileID: 10905, 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 | ||
| --- !u!114 &11483478 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 118010} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Navigation: | ||
| m_Mode: 3 | ||
| m_SelectOnUp: {fileID: 0} | ||
| m_SelectOnDown: {fileID: 0} | ||
| m_SelectOnLeft: {fileID: 0} | ||
| m_SelectOnRight: {fileID: 0} | ||
| m_Transition: 1 | ||
| m_Colors: | ||
| m_NormalColor: {r: 1, g: 1, b: 1, a: 1} | ||
| m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} | ||
| m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} | ||
| m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} | ||
| m_ColorMultiplier: 1 | ||
| m_FadeDuration: .100000001 | ||
| m_SpriteState: | ||
| m_HighlightedSprite: {fileID: 0} | ||
| m_PressedSprite: {fileID: 0} | ||
| m_DisabledSprite: {fileID: 0} | ||
| m_AnimationTriggers: | ||
| m_NormalTrigger: Normal | ||
| m_HighlightedTrigger: Highlighted | ||
| m_PressedTrigger: Pressed | ||
| m_DisabledTrigger: Disabled | ||
| m_Interactable: 1 | ||
| m_TargetGraphic: {fileID: 11434666} | ||
| m_OnClick: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, | ||
| Culture=neutral, PublicKeyToken=null | ||
| --- !u!114 &11490688 | ||
| MonoBehaviour: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 154304} | ||
| m_Enabled: 1 | ||
| m_EditorHideFlags: 0 | ||
| m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| m_Material: {fileID: 0} | ||
| m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} | ||
| m_RaycastTarget: 1 | ||
| m_OnCullStateChanged: | ||
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, | ||
| Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | ||
| m_FontData: | ||
| m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} | ||
| m_FontSize: 14 | ||
| m_FontStyle: 0 | ||
| m_BestFit: 1 | ||
| m_MinSize: 10 | ||
| m_MaxSize: 40 | ||
| m_Alignment: 4 | ||
| m_RichText: 1 | ||
| m_HorizontalOverflow: 0 | ||
| m_VerticalOverflow: 0 | ||
| m_LineSpacing: 1 | ||
| m_Text: Button | ||
| --- !u!222 &22201990 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 118010} | ||
| --- !u!222 &22293210 | ||
| CanvasRenderer: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 154304} | ||
| --- !u!224 &22441182 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 154304} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: [] | ||
| m_Father: {fileID: 22496654} | ||
| m_RootOrder: 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: .5, y: .5} | ||
| --- !u!224 &22496654 | ||
| RectTransform: | ||
| m_ObjectHideFlags: 1 | ||
| m_PrefabParentObject: {fileID: 0} | ||
| m_PrefabInternal: {fileID: 100100000} | ||
| m_GameObject: {fileID: 118010} | ||
| m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | ||
| m_LocalPosition: {x: 0, y: 0, z: 0} | ||
| m_LocalScale: {x: 1, y: 1, z: 1} | ||
| m_Children: | ||
| - {fileID: 22441182} | ||
| m_Father: {fileID: 0} | ||
| m_RootOrder: 0 | ||
| m_AnchorMin: {x: 0, y: .5} | ||
| m_AnchorMax: {x: 1, y: .5} | ||
| m_AnchoredPosition: {x: 0, y: 0} | ||
| m_SizeDelta: {x: 0, y: 80} | ||
| m_Pivot: {x: .5, y: .5} | ||
| --- !u!1001 &100100000 | ||
| Prefab: | ||
| m_ObjectHideFlags: 1 | ||
| serializedVersion: 2 | ||
| m_Modification: | ||
| m_TransformParent: {fileID: 0} | ||
| m_Modifications: | ||
| - target: {fileID: 0} | ||
| propertyPath: m_SizeDelta.y | ||
| value: 80 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 0} | ||
| propertyPath: m_AnchoredPosition.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| - target: {fileID: 0} | ||
| propertyPath: m_SizeDelta.x | ||
| value: 0 | ||
| objectReference: {fileID: 0} | ||
| m_RemovedComponents: [] | ||
| m_ParentPrefab: {fileID: 0} | ||
| m_RootGameObject: {fileID: 118010} | ||
| m_IsPrefabParent: 1 |
| @@ -0,0 +1,226 @@ | ||
| /// <summary> | ||
| /// Brought you by Mrs. YakaYocha | ||
| /// https://www.youtube.com/channel/UCHp8LZ_0-iCvl-5pjHATsgw | ||
| /// | ||
| /// Please donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RJ8D9FRFQF9VS | ||
| /// </summary> | ||
|
|
||
| namespace UnityEngine.UI.Extensions.Examples | ||
| { | ||
| public class ScrollingCalendar : MonoBehaviour | ||
| { | ||
| public RectTransform monthsScrollingPanel; | ||
| public RectTransform yearsScrollingPanel; | ||
| public RectTransform daysScrollingPanel; | ||
|
|
||
| public GameObject yearsButtonPrefab; | ||
| public GameObject monthsButtonPrefab; | ||
| public GameObject daysButtonPrefab; | ||
|
|
||
| private GameObject[] monthsButtons; | ||
| private GameObject[] yearsButtons; | ||
| private GameObject[] daysButtons; | ||
|
|
||
| public RectTransform monthCenter; | ||
| public RectTransform yearsCenter; | ||
| public RectTransform daysCenter; | ||
|
|
||
| UIVerticalScroller yearsVerticalScroller; | ||
| UIVerticalScroller monthsVerticalScroller; | ||
| UIVerticalScroller daysVerticalScroller; | ||
|
|
||
| public InputField inputFieldDays; | ||
| public InputField inputFieldMonths; | ||
| public InputField inputFieldYears; | ||
|
|
||
| public Text dateText; | ||
|
|
||
| private int daysSet; | ||
| private int monthsSet; | ||
| private int yearsSet; | ||
|
|
||
| private void InitializeYears() | ||
| { | ||
| int currentYear = int.Parse(System.DateTime.Now.ToString("yyyy")); | ||
|
|
||
| int[] arrayYears = new int[currentYear + 1 - 1900]; | ||
|
|
||
| yearsButtons = new GameObject[arrayYears.Length]; | ||
|
|
||
| for (int i = 0; i < arrayYears.Length; i++) | ||
| { | ||
| arrayYears[i] = 1900 + i; | ||
|
|
||
| GameObject clone = (GameObject)Instantiate(yearsButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; | ||
| clone.transform.SetParent(yearsScrollingPanel, false); | ||
| clone.transform.localScale = new Vector3(1, 1, 1); | ||
| clone.GetComponentInChildren<Text>().text = "" + arrayYears[i]; | ||
| clone.name = "Year_" + arrayYears[i]; | ||
| clone.AddComponent<CanvasGroup>(); | ||
| yearsButtons[i] = clone; | ||
|
|
||
| } | ||
|
|
||
| } | ||
|
|
||
| //Initialize Months | ||
| private void InitializeMonths() | ||
| { | ||
| int[] months = new int[12]; | ||
|
|
||
| monthsButtons = new GameObject[months.Length]; | ||
| for (int i = 0; i < months.Length; i++) | ||
| { | ||
| string month = ""; | ||
| months[i] = i; | ||
|
|
||
| GameObject clone = (GameObject)Instantiate(monthsButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; | ||
| clone.transform.SetParent(monthsScrollingPanel, false); | ||
| clone.transform.localScale = new Vector3(1, 1, 1); | ||
|
|
||
| switch (i) | ||
| { | ||
| case 0: | ||
| month = "Jan"; | ||
| break; | ||
| case 1: | ||
| month = "Feb"; | ||
| break; | ||
| case 2: | ||
| month = "Mar"; | ||
| break; | ||
| case 3: | ||
| month = "Apr"; | ||
| break; | ||
| case 4: | ||
| month = "May"; | ||
| break; | ||
| case 5: | ||
| month = "Jun"; | ||
| break; | ||
| case 6: | ||
| month = "Jul"; | ||
| break; | ||
| case 7: | ||
| month = "Aug"; | ||
| break; | ||
| case 8: | ||
| month = "Sep"; | ||
| break; | ||
| case 9: | ||
| month = "Oct"; | ||
| break; | ||
| case 10: | ||
| month = "Nov"; | ||
| break; | ||
| case 11: | ||
| month = "Dec"; | ||
| break; | ||
| } | ||
|
|
||
| clone.GetComponentInChildren<Text>().text = month; | ||
| clone.name = "Month_" + months[i]; | ||
| clone.AddComponent<CanvasGroup>(); | ||
| monthsButtons[i] = clone; | ||
| } | ||
| } | ||
|
|
||
| private void InitializeDays() | ||
| { | ||
| int[] days = new int[31]; | ||
| daysButtons = new GameObject[days.Length]; | ||
|
|
||
| for (var i = 0; i < days.Length; i++) | ||
| { | ||
| days[i] = i + 1; | ||
| GameObject clone = (GameObject)Instantiate(daysButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; | ||
| clone.transform.SetParent(daysScrollingPanel, false); | ||
| clone.transform.localScale = new Vector3(1, 1, 1); | ||
| clone.GetComponentInChildren<Text>().text = "" + days[i]; | ||
| clone.name = "Day_" + days[i]; | ||
| clone.AddComponent<CanvasGroup>(); | ||
| daysButtons[i] = clone; | ||
| } | ||
| } | ||
|
|
||
| // Use this for initialization | ||
| public void Awake() | ||
| { | ||
| InitializeYears(); | ||
| InitializeMonths(); | ||
| InitializeDays(); | ||
|
|
||
| //Yes Unity complains about this but it doesn't matter in this case. | ||
| monthsVerticalScroller = new UIVerticalScroller(monthsScrollingPanel, monthsButtons, monthCenter); | ||
| yearsVerticalScroller = new UIVerticalScroller(yearsScrollingPanel, yearsButtons, yearsCenter); | ||
| daysVerticalScroller = new UIVerticalScroller(daysScrollingPanel, daysButtons, daysCenter); | ||
|
|
||
| monthsVerticalScroller.Start(); | ||
| yearsVerticalScroller.Start(); | ||
| daysVerticalScroller.Start(); | ||
| } | ||
|
|
||
| public void SetDate() | ||
| { | ||
| daysSet = int.Parse(inputFieldDays.text) - 1; | ||
| monthsSet = int.Parse(inputFieldMonths.text) - 1; | ||
| yearsSet = int.Parse(inputFieldYears.text) - 1900; | ||
|
|
||
| daysVerticalScroller.SnapToElement(daysSet); | ||
| monthsVerticalScroller.SnapToElement(monthsSet); | ||
| yearsVerticalScroller.SnapToElement(yearsSet); | ||
| } | ||
|
|
||
| void Update() | ||
| { | ||
| monthsVerticalScroller.Update(); | ||
| yearsVerticalScroller.Update(); | ||
| daysVerticalScroller.Update(); | ||
|
|
||
| string dayString = daysVerticalScroller.GetResults(); | ||
| string monthString = monthsVerticalScroller.GetResults(); | ||
| string yearsString = yearsVerticalScroller.GetResults(); | ||
|
|
||
| if (dayString.EndsWith("1") && dayString != "11") | ||
| dayString = dayString + "st"; | ||
| else if (dayString.EndsWith("2") && dayString != "12") | ||
| dayString = dayString + "nd"; | ||
| else if (dayString.EndsWith("3") && dayString != "13") | ||
| dayString = dayString + "rd"; | ||
| else | ||
| dayString = dayString + "th"; | ||
|
|
||
| dateText.text = monthString + " " + dayString + " " + yearsString; | ||
| } | ||
|
|
||
| public void DaysScrollUp() | ||
| { | ||
| daysVerticalScroller.ScrollUp(); | ||
| } | ||
|
|
||
| public void DaysScrollDown() | ||
| { | ||
| daysVerticalScroller.ScrollDown(); | ||
| } | ||
|
|
||
| public void MonthsScrollUp() | ||
| { | ||
| monthsVerticalScroller.ScrollUp(); | ||
| } | ||
|
|
||
| public void MonthsScrollDown() | ||
| { | ||
| monthsVerticalScroller.ScrollDown(); | ||
| } | ||
|
|
||
| public void YearsScrollUp() | ||
| { | ||
| yearsVerticalScroller.ScrollUp(); | ||
| } | ||
|
|
||
| public void YearsScrollDown() | ||
| { | ||
| yearsVerticalScroller.ScrollDown(); | ||
| } | ||
| } | ||
| } |
| @@ -0,0 +1,19 @@ | ||
| Copyright (c) 2015 | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
| @@ -0,0 +1,237 @@ | ||
| # README | ||
|
|
||
| This is an extension project for the new Unity UI system which can be found at: [Unity UI Source](https://bitbucket.org/Unity-Technologies/ui) | ||
|
|
||
|
|
||
| # [Intro](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/GettingStarted) | ||
| For more info, here's a little introduction video for the project: | ||
|
|
||
| [](http://www.youtube.com/watch?v=njoIeE4akq0 "Unity UI Extensions intro video") | ||
|
|
||
| You can follow the UI Extensions team for updates and news on: | ||
| ## [Twitter](https://twitter.com/hashtag/UnityUIExtensions?src=hash) / [Facebook](https://www.facebook.com/UnityUIExtensions/) / [YouTube](https://www.youtube.com/channel/UCG3gZOkmL-2rmZat4ufv28Q) | ||
|
|
||
| > ## Also, come chat live with the Unity UI Extensions community on Gitter here: [UI Extensions Live Chat](https://gitter.im/Unity-UI-Extensions/Lobby) | ||
| ----- | ||
|
|
||
| # [What is this repository for? ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/About) | ||
|
|
||
| In this repository is a collection of extension scripts / effects and controls to enhance your Unity UI experience. These scripts have been gathered from many sources, combined and improved over time. | ||
|
|
||
| > The majority of the scripts came from the Scripts thread on the [Unity UI forum here](http://bit.ly/UnityUIScriptsForumPost) | ||
| You can either download / fork this project to access the scripts, or you can also download these pre-compiled Unity Assets, chock full of goodness for each release: | ||
|
|
||
| # [Download](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads) | ||
|
|
||
| For the 2.0 release, we have expanded where you can download the UnityPackage asset and widened the options to contribute to the project. | ||
|
|
||
| > I will still stress however, ***contribution is optional***. **The asset / code will always remain FREE** | ||
| [](https://unityuiextensions.itch.io/uiextensions2-0 "Download from Itch.IO") | ||
| [](https://unionassets.com/admin/AssetList "Download from Union Assets") | ||
| [](https://www.patreon.com/UnityUIExtensions "Support Unity UI Extensions on Patreon & download") | ||
|
|
||
| > Still available on the [BitBucket site](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions.unitypackage) if you prefer | ||
| To view previous releases, visit the [release archive](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads) | ||
|
|
||
| ----- | ||
|
|
||
| # [Supporting the UI Extensions project](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=89L8T9N6BR7LJ) | ||
|
|
||
| If you wish to further support the Unity UI Extensions project itself, then you can either subsidise your downloads above, or contribute direct using the PayPal link below. | ||
| All funds go to support the project, no matter the amount, donations in code are also extremely welcome :D | ||
|
|
||
| > (PayPal account not required and you can remain anonymous if you wish) | ||
| ## [>> Donate via PayPal <<](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=89L8T9N6BR7LJ) | ||
|
|
||
| ----- | ||
|
|
||
| # [Getting Started](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/GettingStarted) | ||
| To get started with the project, here's a little guide: | ||
|
|
||
| [](http://www.youtube.com/watch?v=sVLeYmsNQAI "Unity UI getting started video") | ||
|
|
||
| ----- | ||
|
|
||
| # [Updates:](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/ReleaseNotes/RELEASENOTES) | ||
|
|
||
| ## Update 2.0 - The update so big they had to name it twice | ||
| [](https://www.youtube.com/watch?v=Ivzt9_jhGfQ "Update 2.0 for the Unity UI Extensions Project") | ||
|
|
||
| > Be sure to logon to the new Gitter Chat site for the UI Extensions project, if you have any questions, queries or suggestions | ||
| > Much easier that posting a question / issue on YouTube, Twitter or Facebook :D | ||
| > ## [UIExtensions Gitter Chanel](https://gitter.im/Unity-UI-Extensions/Lobby) | ||
| ### New / updated features | ||
| * Major updates to the Line renderer for texture and positioning support, inc Editor support | ||
| * Line Renderer also includes "dotted" line support and the ability to increase the vertex count | ||
| * Reorderable list now also works in Screenspace-Camera & Worldspace | ||
| * H&V Scroll Snap controls now support scrollbars | ||
| * Minor updates to the Gradient 2 control | ||
| * Minor updates to all dropdown controls to manage control startup | ||
| * Update UI Particle Renderer with new updates, including Texture Sheet animation support | ||
| * New Selectable Scalar | ||
| * New MonoSpacing text effect | ||
| * New Multi-Touch Scrollrect support | ||
| * New UI Grid Renderer (handy if you want a UI grid background) | ||
| * New CoolDownButton control (adds a timer between button clicks) | ||
| * New Curly UI - for those who like their UI Bendy | ||
| * New Fancy Scroll View - A programmatic scroll view | ||
| * New UI Line connector control - extends line renderer to draw lines between UI Objects | ||
| * New Radial Slider control - for those who like their sliders to curve | ||
| * New Stepper control - a +/- control similar to that found on iOS | ||
| * New Segmented Control - A button array control similar to that found on iOS | ||
| * New UIHighlightable control - just in case the user wasn't sure where they were | ||
|
|
||
| ### Examples / Examples / Examples | ||
| Finally added some proper examples, especially for the newer controls. | ||
| These can be found in the Examples folder (which can be safely deleted if you wish) | ||
|
|
||
| * ColorPicker - shows the Color Picker UI in both SS and WS | ||
| * ComboBox - shows all the different combo box controls | ||
| * Cooldown - several example implementations of the cooldown button control using Unity image effects and SAUIM | ||
| * CurlyUI - shows off the CurlyUI control | ||
| * FancyScrollView - the only REAL way to understand this programmatic control (direct from the contributor) | ||
| * HSS-VSS-ScrollSnap - several working examples of the HSS/VSS scroll snaps (not ScrollSnap or FancyScrollView), including a full screen variant | ||
| * MenuExample - A demo menu implementation showing off the new MenuManager control | ||
| * Radial Slider - Just keep on sliding | ||
| * ReorderableList - Several examples of the re-orderable list in action, complete with managed drag / drop features | ||
| * ScrollConflictManager - Making ScrollRects get along | ||
| * SelectionBox - The RTS selector in action, showing examples of selecting 2D and 3D objects | ||
| * Serialisation - Unit test case examples for the serialisation components | ||
| * TextEffects - All the Text effects and shaders in one easy to view place | ||
| * UIlineRenderer - Several demos / examples for using the Line Renderer and UI Line connector controls | ||
| * UIVerticalScrollerDemo - A full screen example of a UIVertical Scroller implementation. | ||
|
|
||
| ### Fixes | ||
| * H&V Scroll Snap Next/Previous Button interactable handler (only enables when there is a child to move to) | ||
| * H&V Scroll Snap Swipe logic updated and now includes scaling support | ||
| * Editor options for non-drawing graphic control | ||
| * Events in ComboBox, Dropdown and autocomplete controls updated to use UI events | ||
| * UIFlippable "Argument out of Range" bigfix (pesky component orders with effects) | ||
| * All primitive controls will now redraw when enabled in code | ||
| * Autocomplete has two lookup text methods now, Array and Linq | ||
| * Line renderer pivot fix (now respects the pivot point) | ||
| * TextPic rendering and event updates | ||
| * Minor tweaks to the UIParticle system to remove "upgrade" errors. Still needs a rework tbh | ||
| * Clean up of all unnecessary usings (swept under the rug) | ||
|
|
||
| ### Known issues | ||
| Serialisation functionality has been removed due to several incompatibilities between platforms, suggest the UniversalSerialiser as an alternative. May bring back if there is demand. (or copy out the source from the previous release) | ||
|
|
||
| ## Upgrade Notes | ||
| With this being a major version update, it is recommended to remove the old UI Extensions folder before importing the new asset. | ||
|
|
||
| ---------------- | ||
| ## Release History | ||
|
|
||
| For the full release history, follow the below link to the full release notes page. | ||
|
|
||
| ### [Release Notes](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/ReleaseNotes/RELEASENOTES) | ||
|
|
||
| --- | ||
| # [Controls and extensions listed in this project](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls): | ||
|
|
||
| There are almost 70+ extension controls / effect and other utilities in the project which are listed on the following page: | ||
|
|
||
| ## [UI Extensions controls list](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls) | ||
|
|
||
| [Controls](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-controls)||||| | ||
| ------|------|------|------| | ||
| Accordion|ColorPicker|SelectionBox|UIButton|UIFlippable | ||
| ComboBox|AutoCompleteComboBox|DropDownList|BoundToolTip|UIWindowBase | ||
| UI_Knob|TextPic|InputFocus|Box Slider|CooldownButton | ||
| Segmented Control|Stepper||| | ||
| |||| | ||
|
|
||
| [Primitives](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-primitives)||||| | ||
| ------|------|------|------| | ||
| UILineRenderer|UILineTextureRenderer|UICircle|DiamondGraph|UICornerCut | ||
| UIPolygon|||| | ||
| |||| | ||
|
|
||
| [Layouts](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-layouts)||||| | ||
| ------|------|------|------| | ||
| Horizontal Scroll Snap|Vertical Scroll Snap|Flow Layout Group|Radial Layout|Tile Size Fitter | ||
| Scroll Snap (alt implementation)|Reorderable List|UI Vertical Scroller|Curved Layout|Table Layout | ||
| FancyScrollView|||| | ||
| |||| | ||
|
|
||
| [Effects](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-effect_components)||||| | ||
| ------|------|------|------| | ||
| Best Fit Outline|Curved Text|Gradient|Gradient2|Letter Spacing | ||
| NicerOutline|RaycastMask|UIFlippable|UIImageCrop|SoftAlphaMask | ||
| CylinderText|UIParticleSystem|CurlyUI|| | ||
| |||| | ||
|
|
||
| [VR Components](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-vr_components)||||| | ||
| ------|------|------|------| | ||
| VRCursor|VRInputModule||| | ||
| |||| | ||
|
|
||
| [Input Modules](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-input_modules)||||| | ||
| ------|------|------|------| | ||
| AimerInputModule|GamePadInputModule||| | ||
| |||| | ||
|
|
||
| [Additional Components](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-additional_components)||||| | ||
| ------|------|------|------| | ||
| ReturnKeyTrigger|TabNavigation|uGUITools|ScrollRectTweener|ScrollRectLinker | ||
| ScrollRectEx|UI_InfiniteScroll|UI_ScrollRectOcclusion|UIScrollToSelection|UISelectableExtension | ||
| switchToRectTransform|ScrollConflictManager|CLFZ2 (Encryption)|DragCorrector|PPIViewer | ||
| UI_TweenScale|UI_InfiniteScroll|UI_ScrollRectOcclusion|NonDrawingGraphic|UILineConnector | ||
| UIHighlightable|Menu Manager|Pagination Manager|| | ||
| |||| | ||
|
|
||
| *More to come* | ||
|
|
||
| --- | ||
|
|
||
|
|
||
| # [How do I get set up? ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/GettingStarted) | ||
|
|
||
| Either clone / download this repository to your machine and then copy the scripts in, or use the pre-packaged .UnityPackage for your version of Unity and import it as a custom package in to your project. | ||
|
|
||
| # [Contribution guidelines ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/ContributionGuidelines) | ||
|
|
||
| Got a script you want added? Then just fork the bitbucket repository and submit a PR. All contributions accepted (including fixes) | ||
| Just ensure | ||
| * The header of the script matches the standard used in all scripts | ||
| * The script uses the **Unity.UI.Extensions** namespace so they do not affect any other developments | ||
| * (optional) Add Component and Editor options where possible (editor options are in the Editor\UIExtensionsMenuOptions.cs file) | ||
|
|
||
| # [License ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/License) | ||
|
|
||
| All scripts conform to the BSD license and are free to use / distribute. See the [LICENSE](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/License) file for more information | ||
|
|
||
| # [Like what you see? ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/FurtherInfo) | ||
|
|
||
| All these scripts were put together for my latest book Unity3D UI Essentials | ||
| Check out the [page on my blog](http://bit.ly/Unity3DUIEssentials) for more details and learn all about the inner workings of the new Unity UI System. | ||
|
|
||
| # [The downloads ](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads) | ||
|
|
||
| As this repo was created to support my new Unity UI Title ["Unity 3D UI Essentials"](http://bit.ly/Unity3DUIEssentials), in the downloads section you will find two custom assets (SpaceShip-DemoScene-Start.unitypackage and RollABallSample-Start.unitypackage). These are just here as starter scenes for doing UI tasks in the book. | ||
|
|
||
| I will add more sample scenes for the UI examples in this repository and detail them above over time. | ||
|
|
||
| # [Previous Releases](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Downloads) | ||
|
|
||
| * [Unity UI Extensions Unity 4.x Asset](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-4.x.unitypackage) | ||
|
|
||
| * [Unity UI Extensions Unity 5.1 Asset](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-5.1.unitypackage) | ||
|
|
||
| * [Unity UI Extensions Unity 5.2 Asset](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-5.2.unitypackage) <- 5.2.0 - 5.2.1 base releases ONLY | ||
|
|
||
| * [Unity UI Extensions Unity 5.3 (5.2.1P+) Asset](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/downloads/UnityUIExtensions-5.3.unitypackage) <- use this for 5.2.1P+ releases | ||
|
|
||
| > **Note** To retain 5.2 compatibility in the 5.3 package, you will see two warnings related to: | ||
| > ``` | ||
| > `UnityEngine.UI.InputField.onValueChange' is obsolete. | ||
| > ``` | ||
| > This has no effect on the package working in 5.4 plus and is only there to maintain backwards compatibility. We will look to update/remove this in a future release, likely after 5.4. | ||
| If you have any concerns, feel free to update your code in your project to add the missing "d". Unity have ensured it still works as they have mapped the API change for now. |
| @@ -0,0 +1,188 @@ | ||
| # Unity UI Extensions release notes # | ||
| This file contains the up to date release notes for each release of the UI Extensions project including release videos where required. | ||
|
|
||
| ---------------- | ||
| ## Update 2.0 - The update so big they had to name it twice | ||
| [](https://www.youtube.com/watch?v=Ivzt9_jhGfQ "Update 2.0 for the Unity UI Extensions Project") | ||
|
|
||
| > Be sure to logon to the new Gitter Chat site for the UI Extensions project, if you have any questions, queries or suggestions | ||
| > | ||
| > Much easier that posting a question / issue on YouTube, Twitter or Facebook :D | ||
| > | ||
| > ## [UIExtensions Gitter Chanel](https://gitter.im/Unity-UI-Extensions/Lobby) | ||
| ### New / updated features | ||
| * Major updates to the Line renderer for texture and positioning support, inc Editor support | ||
| * Line Renderer also includes "dotted" line support and the ability to increase the vertex count | ||
| * Reorderable list now also works in Screenspace-Camera & Worldspace | ||
| * H&V Scroll Snap controls now support scrollbars | ||
| * Minor updates to the Gradient 2 control | ||
| * Minor updates to all dropdown controls to manage control startup | ||
| * Update UI Particle Renderer with new updates, including Texture Sheet animation support | ||
| * New Selectable Scalar | ||
| * New MonoSpacing text effect | ||
| * New Multi-Touch Scrollrect support | ||
| * New UI Grid Renderer (handy if you want a UI grid background) | ||
| * New CoolDownButton control (adds a timer between button clicks) | ||
| * New Curly UI - for those who like their UI Bendy | ||
| * New Fancy Scroll View - A programmatic scroll view | ||
| * New UI Line connector control - extends line renderer to draw lines between UI Objects | ||
| * New Radial Slider control - for those who like their sliders to curve | ||
| * New Stepper control - a +/- control similar to that found on iOS | ||
| * New Segmented Control - A button array control similar to that found on iOS | ||
| * New UIHighlightable control - just in case the user wasn't sure where they were | ||
|
|
||
| ### Examples / Examples / Examples | ||
| Finally added some proper examples, especially for the newer controls. | ||
| These can be found in the Examples folder (which can be safely deleted if you wish) | ||
|
|
||
| * ColorPicker - shows the Color Picker UI in both SS and WS | ||
| * ComboBox - shows all the different combo box controls | ||
| * Cooldown - several example implementations of the cooldown button control using Unity image effects and SAUIM | ||
| * CurlyUI - shows off the CurlyUI control | ||
| * FancyScrollView - the only REAL way to understand this programmatic control (direct from the contributor) | ||
| * HSS-VSS-ScrollSnap - several working examples of the HSS/VSS scroll snaps (not ScrollSnap or FancyScrollView), including a full screen variant | ||
| * MenuExample - A demo menu implementation showing off the new MenuManager control | ||
| * Radial Slider - Just keep on sliding | ||
| * ReorderableList - Several examples of the re-orderable list in action, complete with managed drag / drop features | ||
| * ScrollConflictManager - Making ScrollRects get along | ||
| * SelectionBox - The RTS selector in action, showing examples of selecting 2D and 3D objects | ||
| * Serialisation - Unit test case examples for the serialisation components | ||
| * TextEffects - All the Text effects and shaders in one easy to view place | ||
| * UIlineRenderer - Several demos / examples for using the Line Renderer and UI Line connector controls | ||
| * UIVerticalScrollerDemo - A full screen example of a UIVertical Scroller implementation. | ||
|
|
||
| ### Fixes | ||
| * H&V Scroll Snap Next/Previous Button interactable handler (only enables when there is a child to move to) | ||
| * H&V Scroll Snap Swipe logic updated and now includes scaling support | ||
| * Editor options for non-drawing graphic control | ||
| * Events in ComboBox, Dropdown and autocomplete controls updated to use UI events | ||
| * UIFlippable "Argument out of Range" bigfix (pesky component orders with effects) | ||
| * All primitive controls will now redraw when enabled in code | ||
| * Autocomplete has two lookup text methods now, Array and Linq | ||
| * Line renderer pivot fix (now respects the pivot point) | ||
| * TextPic rendering and event updates | ||
| * Minor tweaks to the UIParticle system to remove "upgrade" errors. Still needs a rework tbh | ||
| * Clean up of all unnecessary usings (swept under the rug) | ||
|
|
||
| ### Known issues | ||
| Serialisation functionality has been removed due to several incompatibilities between platforms, suggest the UniversalSerialiser as an alternative. May bring back if there is demand. (or copy out the source from the previous release) | ||
|
|
||
| ## Upgrade Notes | ||
| With this being a major version update, it is recommended to remove the old UI Extensions folder before importing the new asset. | ||
|
|
||
| ---------------- | ||
| ## Update 1.2 | ||
| [](https://www.youtube.com/watch?v=cWv0A6rEEc8 "Update 1.2 for the Unity UI Extensions Project") | ||
|
|
||
| ### New / updated features | ||
| * Major updates to the Horizontal and Vertical Scroll Snap controls | ||
| * Replacement HSV/Color picker control (and new Box Slider control) | ||
| * Fixes / updates to the TextPic control | ||
| * Updates to SoftAlphaUI script - improved Text / worldspace support | ||
| * Updates to Extensions Toggle - Adds ID and event to publish ID on change | ||
| * New Gadient control (gradient 2) | ||
| * New UI ScrollRect Occlusion utility | ||
| * New UI Tween Scale utility | ||
| * New UI Infinite ScrollRect | ||
| * New Table Layout Group | ||
|
|
||
| ### Fixes | ||
| * H&V Scroll Snap indexing issues | ||
| * H&V Scroll Snap performance updates | ||
| * H&V Scroll Snap Long swipe behavior updated | ||
| * H&V Scroll Snap support for Rect Resizing | ||
| * TextPic Set set before draw issues | ||
| * HSV picker replaced with more generic color picker | ||
|
|
||
| ### Known issues | ||
| * The Image_Extended control has been removed due to Unity upgrade issues. Will return in a future update. | ||
|
|
||
| ## Upgrade Notes | ||
| Although not specifically required, it is recommended to remove the old UI Extensions folder before importing the new asset | ||
| The HSS picker especially had a lot of file changes in this update. | ||
|
|
||
| >**Note** In Unity 5.5 the particle system was overhauled and several methods were marked for removal. However, the UI Particle System script currently still uses them | ||
| > Either ignore these errors or remove the *_UIParticleSystem_* script in the "*Unity UI Extensions / Scripts / Effects*" folder | ||
| ---------------- | ||
| ## Update 1.1 | ||
|
|
||
| [](https://www.youtube.com/watch?v=JuE0ja5DmV4 "Update 1.1 for the Unity UI Extensions Project") | ||
| > **Note** for 4.6 / 5.1, some features will not be available due to their incompatibility. | ||
| > Also the Line Renderer remains unchanged in these releases as the updates do not work with the older system | ||
| ### New / updated features | ||
| * New Polygon primitive | ||
| * New UI Vertical Scroller control | ||
| * New Curved layout component | ||
| * New Shining effect | ||
| * New UI Particle system **<-5.3+ only** | ||
| * New Scroll Conflict Manager | ||
| * Soft Alpha Mask updated in line with SAUI 1.3 release | ||
| * Line Renderer has had a complete overhaul, including full programmatic support, Line list and Bezier line rendering | ||
| * Horizontal and Vertical Scroll Snaps updated to include a Starting page, current page and transition speed parameters. Plus a new GoToPage, Add and Remove page functions | ||
| * Added some script helper functions for LZF compression and Serialization | ||
| * Two utilities to help manage drag thresholds on high PPI systems | ||
|
|
||
| ### Fixes | ||
| * Line Render almost completely re-written with tons of fixes | ||
| * Radial layout updated to avoid 360 overlap (first and last) | ||
| * Scroll Snaps updates to better handle children. | ||
| * Scroll Snaps distribute function updated so it can be called onDirty more efficiently. | ||
|
|
||
| ## Upgrade Notes | ||
| Two scripts were moved and need their originals need deleting post upgrade. Please remove the following files: | ||
| * Scripts\ImageExtended | ||
| * Scripts\UIImageCrop | ||
|
|
||
| ---------------- | ||
| ## Update 1.0.6.1 | ||
|
|
||
| - Minor update to enhance soft alpha mask and add cylinder text plus a fix to letter spacing | ||
|
|
||
| ---------------- | ||
| ## Update 1.0.6 | ||
|
|
||
| [](http://www.youtube.com/watch?v=jpyFiRvSmbg "Update 1.0.6 for the Unity UI Extensions Project") | ||
|
|
||
| * Added the awesome ReOrderable List control, plus some other minor bugfixes / changes. | ||
| * Added a new version of the Scroll Snap control as an alternative to the fixed versions. | ||
| * New set of controls including some shader enhanced solutions | ||
| * I've added a donate column to the lists. If you are getting great use out of a control, help out the dev who created it. Optional of course. Will update with links as I get them. | ||
|
|
||
| ---------------- | ||
| ## Update 1.0.5 | ||
|
|
||
| Few minor fixes and a couple of additional scripts. Predominately created the new 5.3 branch to maintain the UI API changes from the 5.2.1 Patch releases. 5.3 package is 100% compatible with 5.2.1 Patch releases. | ||
|
|
||
| ---------------- | ||
| ## Update 1.0.4 | ||
|
|
||
| [](http://www.youtube.com/watch?v=oF48Qpaq3ls "Update 1.0.0.4 for the Unity UI Extensions Project") | ||
| --- | ||
|
|
||
| ======================= | ||
| # Additional Info | ||
| ======================= | ||
| ### How do I get set up? | ||
| Either clone / download this repository to your machine and then copy the scripts in, or use the pre-packaged .UnityPackage for your version of Unity and import it as a custom package in to your project. | ||
|
|
||
| ### Contribution guidelines | ||
| Got a script you want added, then just fork and submit a PR. All contributions accepted (including fixes) | ||
| Just ensure | ||
| * The header of the script matches the standard used in all scripts | ||
| * The script uses the **Unity.UI.Extensions** namespace so they do not affect any other developments | ||
| * (optional) Add Component and Editor options where possible (editor options are in the Editor\UIExtensionsMenuOptions.cs file) | ||
|
|
||
| ### License | ||
| All scripts conform to the BSD license and are free to use / distribute. See the [LICENSE](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/src/6d03f25b0150994afa97c6a55854d6ae696cad13/LICENSE?at=default) file for more information | ||
|
|
||
| ### Like what you see? | ||
| All these scripts were put together for my latest book Unity3D UI Essentials | ||
| Check out the [page on my blog](http://bit.ly/Unity3DUIEssentials) for more details and learn all about the inner workings of the new Unity UI System. | ||
|
|
||
| ### The downloads | ||
| As this repo was created to support my new Unity UI Title ["Unity 3D UI Essentials"](http://bit.ly/Unity3DUIEssentials), in the downloads section you will find two custom assets (SpaceShip-DemoScene-Start.unitypackage and RollABallSample-Start.unitypackage). These are just here as starter scenes for doing UI tasks in the book. | ||
|
|
||
| I will add more sample scenes for the UI examples in this repository and detail them above over time. |