diff --git a/Editor/CUIBezierCurveEditor.cs b/Editor/CUIBezierCurveEditor.cs new file mode 100644 index 0000000..c275953 --- /dev/null +++ b/Editor/CUIBezierCurveEditor.cs @@ -0,0 +1,59 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +using UnityEditor; + +namespace UnityEngine.UI.Extensions +{ + [CustomEditor(typeof(CUIBezierCurve))] + [CanEditMultipleObjects] + public class CUIBezierCurveEditor : Editor + { + public override void OnInspectorGUI() + { + DrawDefaultInspector(); + } + + protected void OnSceneGUI() + { + CUIBezierCurve script = (CUIBezierCurve)this.target; + + if (script.ControlPoints != null) + { + Vector3[] controlPoints = script.ControlPoints; + + Transform handleTransform = script.transform; + Quaternion handleRotation = script.transform.rotation; + + for (int p = 0; p < CUIBezierCurve.CubicBezierCurvePtNum; p++) + { + EditorGUI.BeginChangeCheck(); + Vector3 newPt = Handles.DoPositionHandle(handleTransform.TransformPoint(controlPoints[p]), handleRotation); + if (EditorGUI.EndChangeCheck()) + { + + Undo.RecordObject(script, "Move Point"); + EditorUtility.SetDirty(script); + controlPoints[p] = handleTransform.InverseTransformPoint(newPt); + script.Refresh(); + } + } + + Handles.color = Color.gray; + Handles.DrawLine(handleTransform.TransformPoint(controlPoints[0]), handleTransform.TransformPoint(controlPoints[1])); + Handles.DrawLine(handleTransform.TransformPoint(controlPoints[1]), handleTransform.TransformPoint(controlPoints[2])); + Handles.DrawLine(handleTransform.TransformPoint(controlPoints[2]), handleTransform.TransformPoint(controlPoints[3])); + + int sampleSize = 10; + + Handles.color = Color.white; + for (int s = 0; s < sampleSize; s++) + { + Handles.DrawLine(handleTransform.TransformPoint(script.GetPoint((float)s / sampleSize)), handleTransform.TransformPoint(script.GetPoint((float)(s + 1) / sampleSize))); + } + + script.EDITOR_ControlPoints = controlPoints; + } + } + } +} \ No newline at end of file diff --git a/Editor/CUIBezierCurveEditor.cs.meta b/Editor/CUIBezierCurveEditor.cs.meta new file mode 100644 index 0000000..4c23381 --- /dev/null +++ b/Editor/CUIBezierCurveEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 40e01e4fb1e006b46a0f127c8a9907b3 +timeCreated: 1485671367 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/CUIGraphicEditor.cs b/Editor/CUIGraphicEditor.cs new file mode 100644 index 0000000..63bfe58 --- /dev/null +++ b/Editor/CUIGraphicEditor.cs @@ -0,0 +1,187 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +using UnityEditor; + +namespace UnityEngine.UI.Extensions +{ + [CustomEditor(typeof(CUIGraphic), true)] + public class CUIGraphicEditor : Editor { + + protected static bool isCurveGpFold = false; + + protected Vector3[] reuse_Vector3s = new Vector3[4]; + + public override void OnInspectorGUI() + { + CUIGraphic script = (CUIGraphic)this.target; + + EditorGUILayout.HelpBox("CurlyUI (CUI) should work with most of the Unity UI. For Image, use CUIImage; for Text, use CUIText; and for others (e.g. RawImage), use CUIGraphic", MessageType.Info); + + if (script.UIGraphic == null) + { + EditorGUILayout.HelpBox("CUI is an extension to Unity's UI. You must set Ui Graphic with a Unity Graphic component (e.g. Image, Text, RawImage)", MessageType.Error); + } + else + { + if (script.UIGraphic is Image && script.GetType() != typeof(CUIImage)) + { + EditorGUILayout.HelpBox("Although CUI components are generalized. It is recommended that for Image, use CUIImage", MessageType.Warning); + } + else if (script.UIGraphic is Text && script.GetType() != typeof(CUIText)) + { + EditorGUILayout.HelpBox("Although CUI components are generalized. It is recommended that for Text, use CUIText", MessageType.Warning); + } + + EditorGUILayout.HelpBox("Now that CUI is ready, change the control points of the top and bottom bezier curves to curve/morph the UI. Improve resolution when the UI seems to look poorly when curved/morphed should help.", MessageType.Info); + + } + + DrawDefaultInspector(); + + // draw the editor that shows the position ratio of all control points from the two bezier curves + isCurveGpFold = EditorGUILayout.Foldout(isCurveGpFold, "Curves Position Ratios"); + if (isCurveGpFold) + { + EditorGUI.indentLevel++; + EditorGUILayout.LabelField("Top Curve"); + EditorGUI.indentLevel++; + Vector3[] controlPoints = script.RefCurvesControlRatioPoints[1].array; + + EditorGUI.BeginChangeCheck(); + for (int p = 0; p < controlPoints.Length; p++) + { + reuse_Vector3s[p] = EditorGUILayout.Vector3Field(string.Format("Control Points {0}", p + 1), controlPoints[p]); + } + + if (EditorGUI.EndChangeCheck()) + { + Undo.RecordObject(script, "Change Ratio Points"); + EditorUtility.SetDirty(script); + + System.Array.Copy(reuse_Vector3s, script.RefCurvesControlRatioPoints[1].array, controlPoints.Length); + script.UpdateCurveControlPointPositions(); + } + EditorGUI.indentLevel--; + EditorGUILayout.LabelField("Bottom Curve"); + EditorGUI.indentLevel++; + controlPoints = script.RefCurvesControlRatioPoints[0].array; + + EditorGUI.BeginChangeCheck(); + for (int p = 0; p < controlPoints.Length; p++) + { + reuse_Vector3s[p] = EditorGUILayout.Vector3Field(string.Format("Control Points {0}", p + 1), controlPoints[p]); + } + + if (EditorGUI.EndChangeCheck()) + { + Undo.RecordObject(script, "Change Ratio Points"); + EditorUtility.SetDirty(script); + + System.Array.Copy(reuse_Vector3s, controlPoints, controlPoints.Length); + script.UpdateCurveControlPointPositions(); + } + EditorGUI.indentLevel--; + EditorGUI.indentLevel--; + } + + EditorGUILayout.Space(); + if (GUILayout.Button("Fit Bezier curves to rect transform")) + { + Undo.RecordObject(script, "Fit to Rect Transform"); + Undo.RecordObject(script.RefCurves[0], "Fit to Rect Transform"); + Undo.RecordObject(script.RefCurves[1], "Fit to Rect Transform"); + EditorUtility.SetDirty(script); + + script.FixTextToRectTrans(); + + script.Refresh(); + } + + EditorGUILayout.Space(); + + // disable group to prevent allowing the reference be used when there is no reference CUI + EditorGUI.BeginDisabledGroup(script.RefCUIGraphic == null); + + if (GUILayout.Button("Reference CUI component for curves")) + { + Undo.RecordObject(script, "Reference Reference CUI"); + Undo.RecordObject(script.RefCurves[0], "Reference Reference CUI"); + Undo.RecordObject(script.RefCurves[1], "Reference Reference CUI"); + EditorUtility.SetDirty(script); + + script.ReferenceCUIForBCurves(); + + script.Refresh(); + } + + EditorGUILayout.HelpBox("Auto set the curves' control points by refencing another CUI. You need to set Ref CUI Graphic (e.g. CUIImage) first.", MessageType.Info); + + EditorGUI.EndDisabledGroup(); + } + + protected virtual void OnSceneGUI() + { + // for CUITextEditor, allow using scene UI to change the control points of the bezier curves + + CUIGraphic script = (CUIGraphic)this.target; + + script.ReportSet(); + + for (int c = 0; c < script.RefCurves.Length; c++) + { + + CUIBezierCurve curve = script.RefCurves[c]; + + if (curve.ControlPoints != null) + { + + Vector3[] controlPoints = curve.ControlPoints; + + Transform handleTransform = curve.transform; + Quaternion handleRotation = curve.transform.rotation; + + for (int p = 0; p < CUIBezierCurve.CubicBezierCurvePtNum; p++) + { + EditorGUI.BeginChangeCheck(); + Handles.Label(handleTransform.TransformPoint(controlPoints[p]), string.Format("Control Point {0}", p + 1)); + Vector3 newPt = Handles.DoPositionHandle(handleTransform.TransformPoint(controlPoints[p]), handleRotation); + if (EditorGUI.EndChangeCheck()) + { + + Undo.RecordObject(curve, "Move Point"); + Undo.RecordObject(script, "Move Point"); + EditorUtility.SetDirty(curve); + controlPoints[p] = handleTransform.InverseTransformPoint(newPt); + + } + } + + Handles.color = Color.gray; + Handles.DrawLine(handleTransform.TransformPoint(controlPoints[0]), handleTransform.TransformPoint(controlPoints[1])); + Handles.DrawLine(handleTransform.TransformPoint(controlPoints[1]), handleTransform.TransformPoint(controlPoints[2])); + Handles.DrawLine(handleTransform.TransformPoint(controlPoints[2]), handleTransform.TransformPoint(controlPoints[3])); + + int sampleSize = 10; + + Handles.color = Color.white; + for (int s = 0; s < sampleSize; s++) + { + Handles.DrawLine(handleTransform.TransformPoint(curve.GetPoint((float)s / sampleSize)), handleTransform.TransformPoint(curve.GetPoint((float)(s + 1) / sampleSize))); + } + + curve.EDITOR_ControlPoints = controlPoints; + } + } + + + if (script.RefCurves != null) + { + Handles.DrawLine(script.RefCurves[0].transform.TransformPoint(script.RefCurves[0].ControlPoints[0]), script.RefCurves[1].transform.TransformPoint(script.RefCurves[1].ControlPoints[0])); + Handles.DrawLine(script.RefCurves[0].transform.TransformPoint(script.RefCurves[0].ControlPoints[3]), script.RefCurves[1].transform.TransformPoint(script.RefCurves[1].ControlPoints[3])); + } + + script.Refresh(); + } + } +} \ No newline at end of file diff --git a/Editor/CUIGraphicEditor.cs.meta b/Editor/CUIGraphicEditor.cs.meta new file mode 100644 index 0000000..93b718b --- /dev/null +++ b/Editor/CUIGraphicEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b7b84624f1ba7bd49b6cfc63b25f4b7c +timeCreated: 1485671367 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/CUIImageEditor.cs b/Editor/CUIImageEditor.cs new file mode 100644 index 0000000..c961d07 --- /dev/null +++ b/Editor/CUIImageEditor.cs @@ -0,0 +1,88 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +using UnityEditor; + +namespace UnityEngine.UI.Extensions +{ + [CustomEditor(typeof(CUIImage))] + public class CUIImageEditor : CUIGraphicEditor + { + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + + CUIImage script = (CUIImage)this.target; + + EditorGUILayout.Space(); + + EditorGUI.BeginChangeCheck(); + + EditorGUI.BeginDisabledGroup(!(script.UIImage.type == Image.Type.Sliced || script.UIImage.type == Image.Type.Tiled)); + Vector2 newCornerRatio = EditorGUILayout.Vector2Field("Corner Ratio", script.cornerPosRatio); + if (EditorGUI.EndChangeCheck()) + { + Undo.RecordObject(script, "Change Corner Ratio"); + EditorUtility.SetDirty(script); + script.cornerPosRatio = newCornerRatio; + } + + if (GUILayout.Button("Use native corner ratio")) + { + Undo.RecordObject(script, "Change Corner Ratio"); + EditorUtility.SetDirty(script); + script.cornerPosRatio = script.OriCornerPosRatio; + } + + if (script.UIImage.type == Image.Type.Sliced || script.UIImage.type == Image.Type.Filled) + { + EditorGUILayout.HelpBox("With CUIImage, you can also adjust the size of the corners for filled or sliced Image. The grey sphere in the editor scene could also be moved to change the corner's size.", MessageType.Info); + } + else + { + EditorGUILayout.HelpBox("With CUIImage, you can also adjust the size of the corners for filled or sliced Image. You need to set Image to filled or sliced to use this feature.", MessageType.Info); + } + + EditorGUI.EndDisabledGroup(); + } + + protected override void OnSceneGUI() + { + base.OnSceneGUI(); + + CUIImage script = (CUIImage)this.target; + + if (script.UIImage.type == Image.Type.Sliced || script.UIImage.type == Image.Type.Tiled) + { + Vector3 cornerPos = Vector3.zero;// + + if (script.IsCurved) + { + cornerPos = script.GetBCurveSandwichSpacePoint(script.cornerPosRatio.x, script.cornerPosRatio.y); + } + else + { + cornerPos.x = script.cornerPosRatio.x * script.RectTrans.rect.width - script.RectTrans.pivot.x * script.RectTrans.rect.width; + cornerPos.y = script.cornerPosRatio.y * script.RectTrans.rect.height - script.RectTrans.pivot.y * script.RectTrans.rect.height; + } + + Handles.color = Color.gray; + EditorGUI.BeginChangeCheck(); + Vector3 newCornerPos = Handles.FreeMoveHandle(script.transform.TransformPoint(cornerPos), script.transform.rotation, HandleUtility.GetHandleSize(script.transform.TransformPoint(cornerPos)) / 7, Vector3.one, Handles.SphereHandleCap); + Handles.Label(newCornerPos, string.Format("Corner Mover")); + + newCornerPos = script.transform.InverseTransformPoint(newCornerPos); + + if (EditorGUI.EndChangeCheck()) + { + Undo.RecordObject(script, "Move Corner"); + EditorUtility.SetDirty(script); + + script.cornerPosRatio = new Vector2(newCornerPos.x, newCornerPos.y); + script.cornerPosRatio.x = (script.cornerPosRatio.x + script.RectTrans.pivot.x * script.RectTrans.rect.width) / script.RectTrans.rect.width; + script.cornerPosRatio.y = (script.cornerPosRatio.y + script.RectTrans.pivot.y * script.RectTrans.rect.height) / script.RectTrans.rect.height; + } + } + } + } +} \ No newline at end of file diff --git a/Editor/CUIImageEditor.cs.meta b/Editor/CUIImageEditor.cs.meta new file mode 100644 index 0000000..5b46895 --- /dev/null +++ b/Editor/CUIImageEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8445204f2ee16e0408274b8400deef53 +timeCreated: 1485929052 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/CUITextEditor.cs b/Editor/CUITextEditor.cs new file mode 100644 index 0000000..d5fa599 --- /dev/null +++ b/Editor/CUITextEditor.cs @@ -0,0 +1,10 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +using UnityEditor; + +namespace UnityEngine.UI.Extensions +{ + [CustomEditor(typeof(CUIText))] + public class CUITextEditor : CUIGraphicEditor { } +} \ No newline at end of file diff --git a/Editor/CUITextEditor.cs.meta b/Editor/CUITextEditor.cs.meta new file mode 100644 index 0000000..feb172b --- /dev/null +++ b/Editor/CUITextEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 041976c43b8439747a030b45a4712b77 +timeCreated: 1485929052 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/UIExtensionsMenuOptions.cs b/Editor/UIExtensionsMenuOptions.cs index da6dd93..0a5ad98 100644 --- a/Editor/UIExtensionsMenuOptions.cs +++ b/Editor/UIExtensionsMenuOptions.cs @@ -1777,6 +1777,44 @@ namespace UnityEditor.UI } #endregion + #region Radial Slider + [MenuItem("GameObject/UI/Extensions/RadialSlider", false)] + static public void AddRadialSlider(MenuCommand menuCommand) + { + GameObject sliderRoot = CreateUIElementRoot("Radial Slider", menuCommand, s_ThickGUIElementSize); + GameObject SliderControl = CreateUIObject("Slider", sliderRoot); + + Image image = sliderRoot.AddComponent(); + image.sprite = AssetDatabase.GetBuiltinExtraResource(kStandardSpritePath); + image.type = Image.Type.Simple; + image.color = s_DefaultSelectableColor; + + RectTransform sliderRootRectTransform = sliderRoot.GetComponent(); + sliderRootRectTransform.anchorMin = new Vector2(0.5f, 0.5f); + sliderRootRectTransform.anchorMax = new Vector2(0.5f, 0.5f); + sliderRootRectTransform.anchoredPosition = Vector2.zero; + sliderRootRectTransform.sizeDelta = new Vector2(250f, 250f); + + Image slidrImage = SliderControl.AddComponent(); + slidrImage.sprite = AssetDatabase.GetBuiltinExtraResource(kStandardSpritePath); + slidrImage.type = Image.Type.Filled; + slidrImage.fillMethod = Image.FillMethod.Radial360; + slidrImage.fillOrigin = 3; + slidrImage.color = Color.red; + slidrImage.fillAmount = 0; + RadialSlider slider = SliderControl.AddComponent(); + slider.StartColor = Color.green; + slider.EndColor = Color.red; + + RectTransform sliderRectTransform = SliderControl.GetComponent(); + sliderRectTransform.anchorMin = Vector2.zero; + sliderRectTransform.anchorMax = Vector2.one; + sliderRectTransform.sizeDelta = Vector2.zero; + + Selection.activeGameObject = sliderRoot; + } + #endregion + #endregion diff --git a/Examples/ComboBox/ComboBoxChanged.cs b/Examples/ComboBox/ComboBoxChanged.cs index abf97bf..6691d5d 100644 --- a/Examples/ComboBox/ComboBoxChanged.cs +++ b/Examples/ComboBox/ComboBoxChanged.cs @@ -1,28 +1,30 @@ using UnityEngine; - -public class ComboBoxChanged : MonoBehaviour { - - - public void ComboBoxChangedEvent (string text) { - - Debug.Log("ComboBox changed [" + text + "]"); - } - - public void AutoCompleteComboBoxChangedEvent(string text) +namespace UnityEngine.UI.Extensions.Examples +{ + public class ComboBoxChanged : MonoBehaviour { + public void ComboBoxChangedEvent(string text) + { - Debug.Log("AutoCompleteComboBox changed [" + text + "]"); + Debug.Log("ComboBox changed [" + text + "]"); + } + + public void AutoCompleteComboBoxChangedEvent(string text) + { + + Debug.Log("AutoCompleteComboBox changed [" + text + "]"); + } + + public void AutoCompleteComboBoxSelectionChangedEvent(string text, bool valid) + { + + Debug.Log("AutoCompleteComboBox selection changed [" + text + "] and its validity was [" + valid + "]"); + } + + public void DropDownChangedEvent(int newValue) + { + + Debug.Log("DropDown changed [" + newValue + "]"); + } } - - public void AutoCompleteComboBoxSelectionChangedEvent(string text, bool valid) - { - - Debug.Log("AutoCompleteComboBox selection changed [" + text + "] and its validity was [" + valid + "]"); - } - - public void DropDownChangedEvent(int newValue) - { - - Debug.Log("DropDown changed [" + newValue + "]"); - } -} +} \ No newline at end of file diff --git a/Examples/Cooldown/CooldownEffect_Image.cs b/Examples/Cooldown/CooldownEffect_Image.cs index c39c668..828796b 100644 --- a/Examples/Cooldown/CooldownEffect_Image.cs +++ b/Examples/Cooldown/CooldownEffect_Image.cs @@ -1,7 +1,7 @@ /// Credit SimonDarksideJ /// Sourced from my head -namespace UnityEngine.UI.Extensions +namespace UnityEngine.UI.Extensions.Examples { [RequireComponent(typeof(Image))] public class CooldownEffect_Image : MonoBehaviour diff --git a/Examples/Cooldown/CooldownEffect_SAUIM.cs b/Examples/Cooldown/CooldownEffect_SAUIM.cs index 5600ad4..2899356 100644 --- a/Examples/Cooldown/CooldownEffect_SAUIM.cs +++ b/Examples/Cooldown/CooldownEffect_SAUIM.cs @@ -1,7 +1,7 @@ /// Credit SimonDarksideJ /// Sourced from my head -namespace UnityEngine.UI.Extensions +namespace UnityEngine.UI.Extensions.Examples { [RequireComponent(typeof(SoftMaskScript))] public class CooldownEffect_SAUIM : MonoBehaviour { diff --git a/Examples/CurlyUI.meta b/Examples/CurlyUI.meta new file mode 100644 index 0000000..42f4980 --- /dev/null +++ b/Examples/CurlyUI.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d426546e1b1bdb346a4f1b7ead452375 +folderAsset: yes +timeCreated: 1501406849 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/CurlyUI/CurlyUIDemo.unity b/Examples/CurlyUI/CurlyUIDemo.unity new file mode 100644 index 0000000..cc70e28 --- /dev/null +++ b/Examples/CurlyUI/CurlyUIDemo.unity @@ -0,0 +1,2104 @@ +%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: 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, 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: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 1 + 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 &6030661 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 6030662} + - component: {fileID: 6030663} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6030662 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 6030661} + 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: 1719805675} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6030663 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 6030661} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: 0, y: 0, z: 0} + - {x: 0, y: 1, z: 0} + - {x: 1, y: 1, z: 0} + - {x: 1, y: 0, z: 0} +--- !u!1 &50312279 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 50312280} + - component: {fileID: 50312281} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &50312280 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 50312279} + 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: 1447857630} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &50312281 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 50312279} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -50, y: -50, z: 0} + - {x: -11.685363, y: -30.074783, z: 0} + - {x: 19.348877, y: 5.5606546, z: 0} + - {x: 50, y: -50, z: 0} +--- !u!1 &77557237 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 77557238} + - component: {fileID: 77557239} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &77557238 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 77557237} + 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: 123690153} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &77557239 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 77557237} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -1.0848525, y: 177.10716, z: 0} + - {x: -58.958763, y: -53.288235, z: 0} + - {x: 228.42569, y: -187.79199, z: 0} + - {x: 288.0183, y: 32.258453, z: 0} +--- !u!1 &99378105 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 99378106} + - component: {fileID: 99378107} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &99378106 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 99378105} + 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: 1447857630} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &99378107 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 99378105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -50, y: 50, z: 0} + - {x: -17.049833, y: 3.2524288, z: 0} + - {x: 18.965698, y: 83.71957, z: 0} + - {x: 50, y: 50, z: 0} +--- !u!1 &123690152 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 123690153} + - component: {fileID: 123690156} + - component: {fileID: 123690155} + - component: {fileID: 123690154} + m_Layer: 5 + m_Name: Text (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &123690153 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 123690152} + 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: 1125965642} + - {fileID: 77557238} + m_Father: {fileID: 1936943074} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 26, y: 275.5} + m_SizeDelta: {x: -490.9, y: -293.7} + m_Pivot: {x: 0, y: 0.000000011175871} +--- !u!114 &123690154 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 123690152} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 64c40f35eca5d5d4da4eefac2a627005, type: 3} + m_Name: + m_EditorClassIdentifier: + isCurved: 1 + isLockWithRatio: 1 + resolution: 10.7 + uiGraphic: {fileID: 123690155} + refCUIGraphic: {fileID: 0} + refCurves: + - {fileID: 77557239} + - {fileID: 1125965643} + refCurvesControlRatioPoints: + - array: + - {x: -0.0047981087, y: 1.1478106, z: 0} + - {x: -0.2607641, y: -0.34535474, z: 0} + - {x: 1.0102861, y: -1.2170577, z: 0} + - {x: 1.2738537, y: 0.20906323, z: 0} + - array: + - {x: 0.42000005, y: 1.1185882, z: 0} + - {x: 0.47966033, y: 0.50782657, z: 0} + - {x: 0.68193156, y: 0.40149453, z: 0} + - {x: 0.91605365, y: 0.84320074, z: 0} +--- !u!114 &123690155 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 123690152} + 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, g: 0, b: 0, 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: 40 + m_FontStyle: 1 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 60 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u6211\u662F\u4E2D\u6587" +--- !u!222 &123690156 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 123690152} +--- !u!1 &317193680 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 317193681} + - component: {fileID: 317193682} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &317193681 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 317193680} + 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: 1447857630} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &317193682 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 317193680} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -50, y: 50, z: 0} + - {x: -20.330566, y: 38.397675, z: 0} + - {x: 25.215727, y: 28.627317, z: 0} + - {x: 50, y: 50, z: 0} +--- !u!1 &443180933 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 443180934} + - component: {fileID: 443180935} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &443180934 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 443180933} + 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: 1719805675} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &443180935 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 443180933} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -112.51854, y: 63.257835, z: 0} + - {x: -26.758408, y: 48.048744, z: 0} + - {x: 37.100582, y: 5.463307, z: 0} + - {x: 138.67813, y: 35.881477, z: 0} +--- !u!1 &907030357 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 907030358} + - component: {fileID: 907030359} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &907030358 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 907030357} + 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: 1719805675} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &907030359 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 907030357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -74.8, y: -73.6, z: 0} + - {x: -15.199524, y: -36.489838, z: 0} + - {x: 32.842052, y: -22.497498, z: 0} + - {x: 91.83416, y: -66.29966, z: 0} +--- !u!1 &925909889 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 925909890} + - component: {fileID: 925909892} + - component: {fileID: 925909891} + - component: {fileID: 925909893} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &925909890 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925909889} + 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: 1960482844} + - {fileID: 1691190995} + m_Father: {fileID: 1936943074} + m_RootOrder: 1 + 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: -11.4, y: -163.9} + m_SizeDelta: {x: 261, y: 111} + m_Pivot: {x: 0, y: 0.000000011175871} +--- !u!114 &925909891 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925909889} + 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, g: 0, b: 0, 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: 25 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 2 + m_MaxSize: 48 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: CurlyUI will make UIs curl +--- !u!222 &925909892 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925909889} +--- !u!114 &925909893 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 925909889} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 64c40f35eca5d5d4da4eefac2a627005, type: 3} + m_Name: + m_EditorClassIdentifier: + isCurved: 1 + isLockWithRatio: 1 + resolution: 5.3 + uiGraphic: {fileID: 925909891} + refCUIGraphic: {fileID: 0} + refCurves: + - {fileID: 1691190996} + - {fileID: 1960482845} + refCurvesControlRatioPoints: + - array: + - {x: 0.000000032071753, y: 0.000000045274025, z: 0} + - {x: 0.34625408, y: 0.41521215, z: 0} + - {x: 0.6666667, y: 0.000000045274025, z: 0} + - {x: 0.8326083, y: -0.56994104, z: 0} + - array: + - {x: 0.000000032071753, y: 1, z: 0} + - {x: 0.18658566, y: 1.7024753, z: 0} + - {x: 0.6666667, y: 1, z: 0} + - {x: 1.3501155, y: 1.6483629, z: 0} +--- !u!1 &984378102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 984378103} + - component: {fileID: 984378104} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &984378103 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 984378102} + 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: 1719805675} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &984378104 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 984378102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -74.8, y: -73.6, z: 0} + - {x: -24.933332, y: -73.6, z: 0} + - {x: 29.514158, y: -60.08641, z: 0} + - {x: 115.4549, y: -10.040925, z: 0} +--- !u!1 &1109254312 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1109254313} + - component: {fileID: 1109254314} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1109254313 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1109254312} + 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: 1754131481} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1109254314 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1109254312} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -24.946047, y: -15.036217, z: 0} + - {x: -5.491959, y: -12.594221, z: 0} + - {x: 13.119457, y: -8.43652, z: 0} + - {x: 30.646164, y: -2.1812794, z: 0} +--- !u!1 &1125965641 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1125965642} + - component: {fileID: 1125965643} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1125965642 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1125965641} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 123690153} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1125965643 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1125965641} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: 94.96201, y: 172.59814, z: 0} + - {x: 108.4512, y: 78.35763, z: 0} + - {x: 154.18472, y: 61.9506, z: 0} + - {x: 207.11974, y: 130.10587, z: 0} +--- !u!1 &1128544828 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1128544829} + - component: {fileID: 1128544833} + - component: {fileID: 1128544831} + - component: {fileID: 1128544832} + - component: {fileID: 1128544830} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1128544829 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1128544828} + 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: 1754131481} + - {fileID: 1496205725} + - {fileID: 1217156814} + m_Father: {fileID: 1936943074} + m_RootOrder: 3 + 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: -97, y: 31} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1128544830 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1128544828} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9ab7726a352b5004cbf5f8e153868637, type: 3} + m_Name: + m_EditorClassIdentifier: + isCurved: 1 + isLockWithRatio: 1 + resolution: 5 + uiGraphic: {fileID: 1128544831} + refCUIGraphic: {fileID: 0} + refCurves: + - {fileID: 1496205726} + - {fileID: 1217156815} + refCurvesControlRatioPoints: + - array: + - {x: -0.18555832, y: -0.1035675, z: 0} + - {x: 0.26860362, y: -0.3797475, z: 0} + - {x: 0.6922041, y: -0.36345062, z: 0} + - {x: 1.0431532, y: 0.43728486, z: 0} + - array: + - {x: 0.018900966, y: 1.6448771, z: 0} + - {x: 0.3333333, y: 1, z: 0} + - {x: 0.68824327, y: 0.80437315, z: 0} + - {x: 0.98705405, y: 0.91944784, z: 0} + cornerPosRatio: {x: 0.081100084, y: 0.29534557} + oriCornerPosRatio: {x: 0.03125, y: 0.16666667} +--- !u!114 &1128544831 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1128544828} + 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 &1128544832 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1128544828} + 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: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1128544831} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!222 &1128544833 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1128544828} +--- !u!1 &1153777620 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1153777621} + - component: {fileID: 1153777622} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1153777621 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153777620} + 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: 1447857630} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1153777622 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1153777620} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -50, y: -50, z: 0} + - {x: -13.613465, y: -15.193025, z: 0} + - {x: 16.666662, y: -50, z: 0} + - {x: 77.47919, y: -36.565735, z: 0} +--- !u!1 &1186022824 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1186022825} + - component: {fileID: 1186022826} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1186022825 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1186022824} + 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: 1710208314} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1186022826 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1186022824} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -50, y: -50, z: 0} + - {x: -16.666668, y: -50, z: 0} + - {x: 16.666662, y: -50, z: 0} + - {x: 50, y: -50, z: 0} +--- !u!1 &1217156813 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1217156814} + - component: {fileID: 1217156815} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1217156814 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1217156813} + 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: 1128544829} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1217156815 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1217156813} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -76.975845, y: 34.346313, z: 0} + - {x: -26.66667, y: 15, z: 0} + - {x: 30.118923, y: 9.131194, z: 0} + - {x: 77.92865, y: 12.583435, z: 0} +--- !u!1 &1223491903 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1223491904} + - component: {fileID: 1223491905} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1223491904 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1223491903} + 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: 1719805675} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1223491905 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1223491903} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: 0, y: 0, z: 0} + - {x: 0, y: 1, z: 0} + - {x: 1, y: 1, z: 0} + - {x: 1, y: 0, z: 0} +--- !u!1 &1333387546 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1333387547} + - component: {fileID: 1333387548} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1333387547 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1333387546} + 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: 1719805675} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1333387548 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1333387546} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -74.8, y: 73.6, z: 0} + - {x: 4.8906274, y: 124.21463, z: 0} + - {x: 27.977337, y: 40.7739, z: 0} + - {x: 130.9152, y: 15.766946, z: 0} +--- !u!1 &1447857629 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1447857630} + - component: {fileID: 1447857633} + - component: {fileID: 1447857632} + - component: {fileID: 1447857631} + m_Layer: 5 + m_Name: RawImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1447857630 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1447857629} + 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: 50312280} + - {fileID: 99378106} + - {fileID: 1153777621} + - {fileID: 317193681} + m_Father: {fileID: 1936943074} + m_RootOrder: 4 + 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: 170.5, y: 90.6} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1447857631 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1447857629} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e011f2cb554f96547bbfc22e5f001c17, type: 3} + m_Name: + m_EditorClassIdentifier: + isCurved: 1 + isLockWithRatio: 1 + resolution: 5 + uiGraphic: {fileID: 1447857632} + refCUIGraphic: {fileID: 0} + refCurves: + - {fileID: 1153777622} + - {fileID: 317193682} + refCurvesControlRatioPoints: + - array: + - {x: 0, y: 0, z: 0} + - {x: 0.36386535, y: 0.34806976, z: 0} + - {x: 0.6666666, y: 0, z: 0} + - {x: 1.2747918, y: 0.13434266, z: 0} + - array: + - {x: 0, y: 1, z: 0} + - {x: 0.29669434, y: 0.88397676, z: 0} + - {x: 0.7521573, y: 0.7862732, z: 0} + - {x: 1, y: 1, z: 0} +--- !u!114 &1447857632 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1447857629} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, 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_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1447857633 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1447857629} +--- !u!1 &1496205724 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1496205725} + - component: {fileID: 1496205726} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1496205725 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1496205724} + 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: 1128544829} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1496205726 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1496205724} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -109.68933, y: -18.107025, z: 0} + - {x: -37.023422, y: -26.392426, z: 0} + - {x: 30.752659, y: -25.903519, z: 0} + - {x: 86.90451, y: -1.8814542, z: 0} +--- !u!1 &1567634135 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1567634140} + - component: {fileID: 1567634139} + - component: {fileID: 1567634138} + - component: {fileID: 1567634137} + - component: {fileID: 1567634136} + 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 &1567634136 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567634135} + m_Enabled: 1 +--- !u!124 &1567634137 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567634135} + m_Enabled: 1 +--- !u!92 &1567634138 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567634135} + m_Enabled: 1 +--- !u!20 &1567634139 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567634135} + 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: 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &1567634140 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1567634135} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1691190994 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1691190995} + - component: {fileID: 1691190996} + m_Layer: 0 + m_Name: BottomRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1691190995 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691190994} + 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: 925909890} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1691190996 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1691190994} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: 0.000008370727, y: 0.000003784895, z: 0} + - {x: 90.372314, y: 46.088547, z: 0} + - {x: 174, y: 0.000003784895, z: 0} + - {x: 217.31076, y: -63.26346, z: 0} +--- !u!1 &1710208313 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1710208314} + - component: {fileID: 1710208317} + - component: {fileID: 1710208316} + - component: {fileID: 1710208315} + m_Layer: 5 + m_Name: Image (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1710208314 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1710208313} + 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: 1186022825} + - {fileID: 1817662573} + m_Father: {fileID: 1936943074} + m_RootOrder: 5 + 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: 6.7, y: 116.1} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1710208315 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1710208313} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9ab7726a352b5004cbf5f8e153868637, type: 3} + m_Name: + m_EditorClassIdentifier: + isCurved: 1 + isLockWithRatio: 1 + resolution: 10.1 + uiGraphic: {fileID: 1710208316} + refCUIGraphic: {fileID: 0} + refCurves: + - {fileID: 1186022826} + - {fileID: 1817662574} + refCurvesControlRatioPoints: + - array: + - {x: 0, y: 0, z: 0} + - {x: 0.3333333, y: 0, z: 0} + - {x: 0.6666666, y: 0, z: 0} + - {x: 1, y: 0, z: 0} + - array: + - {x: 0, y: 1, z: 0} + - {x: 0.3333333, y: 1, z: 0} + - {x: 0.6666666, y: 1, z: 0} + - {x: 1, y: 1, z: 0} + cornerPosRatio: {x: 0.26279283, y: 0.30648604} + oriCornerPosRatio: {x: 0.05, y: 0.05} +--- !u!114 &1710208316 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1710208313} + 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!222 &1710208317 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1710208313} +--- !u!1 &1719805674 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1719805675} + - component: {fileID: 1719805678} + - component: {fileID: 1719805677} + - component: {fileID: 1719805676} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1719805675 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1719805674} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 63} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1223491904} + - {fileID: 6030662} + - {fileID: 984378103} + - {fileID: 1333387547} + - {fileID: 907030358} + - {fileID: 443180934} + m_Father: {fileID: 1936943074} + 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: -180.4, y: -82.700005} + m_SizeDelta: {x: 149.6, y: 147.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1719805676 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1719805674} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9ab7726a352b5004cbf5f8e153868637, type: 3} + m_Name: + m_EditorClassIdentifier: + isCurved: 1 + isLockWithRatio: 1 + resolution: 5 + uiGraphic: {fileID: 1719805677} + refCUIGraphic: {fileID: 0} + refCurves: + - {fileID: 907030359} + - {fileID: 443180935} + refCurvesControlRatioPoints: + - array: + - {x: 0, y: 0, z: 0} + - {x: 0.3983989, y: 0.25210708, z: 0} + - {x: 0.71953243, y: 0.34716374, z: 0} + - {x: 1.1138647, y: 0.049594693, z: 0} + - array: + - {x: -0.25212926, y: 0.9297407, z: 0} + - {x: 0.32113364, y: 0.8264181, z: 0} + - {x: 0.74799854, y: 0.53711486, z: 0} + - {x: 1.4269928, y: 0.74376005, z: 0} + cornerPosRatio: {x: 0.03342246, y: 0.03396739} + oriCornerPosRatio: {x: 0.03342246, y: 0.03396739} +--- !u!114 &1719805677 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1719805674} + 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: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 2 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1719805678 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1719805674} +--- !u!1 &1754131480 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1754131481} + - component: {fileID: 1754131484} + - component: {fileID: 1754131483} + - component: {fileID: 1754131482} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1754131481 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1754131480} + 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: 1109254313} + - {fileID: 2104331182} + m_Father: {fileID: 1128544829} + 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: 49.4, y: 0.0000030993997} + m_SizeDelta: {x: -109.8, y: -7.6} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1754131482 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1754131480} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 64c40f35eca5d5d4da4eefac2a627005, type: 3} + m_Name: + m_EditorClassIdentifier: + isCurved: 1 + isLockWithRatio: 1 + resolution: 5 + uiGraphic: {fileID: 1754131483} + refCUIGraphic: {fileID: 1128544830} + refCurves: + - {fileID: 1109254314} + - {fileID: 2104331183} + refCurvesControlRatioPoints: + - array: + - {x: 0.003066766, y: -0.17125969, z: 0} + - {x: 0.39059842, y: -0.062242024, z: 0} + - {x: 0.7613438, y: 0.12336966, z: 0} + - {x: 1.1104814, y: 0.40262145, z: 0} + - array: + - {x: 0.018939061, y: 0.8813532, z: 0} + - {x: 0.35400516, y: 0.8547576, z: 0} + - {x: 0.6806068, y: 0.87972885, z: 0} + - {x: 0.98991656, y: 0.9538394, z: 0} +--- !u!114 &1754131483 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1754131480} + 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.19607843, g: 0.19607843, b: 0.19607843, 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: Button +--- !u!222 &1754131484 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1754131480} +--- !u!1 &1817662572 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1817662573} + - component: {fileID: 1817662574} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1817662573 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1817662572} + 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: 1710208314} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1817662574 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1817662572} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -50, y: 50, z: 0} + - {x: -16.666668, y: 50, z: 0} + - {x: 16.666662, y: 50, z: 0} + - {x: 50, y: 50, z: 0} +--- !u!1 &1884138602 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1884138604} + - component: {fileID: 1884138603} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1884138603 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1884138602} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1884138604 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1884138602} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, 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!1 &1936943070 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1936943074} + - component: {fileID: 1936943073} + - component: {fileID: 1936943072} + - component: {fileID: 1936943071} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1936943071 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1936943070} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1936943072 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1936943070} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1936943073 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1936943070} + 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 &1936943074 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1936943070} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1719805675} + - {fileID: 925909890} + - {fileID: 123690153} + - {fileID: 1128544829} + - {fileID: 1447857630} + - {fileID: 1710208314} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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 &1960482843 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1960482844} + - component: {fileID: 1960482845} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1960482844 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1960482843} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 925909890} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1960482845 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1960482843} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: 0.000008370727, y: 111, z: 0} + - {x: 48.69886, y: 188.97476, z: 0} + - {x: 174, y: 111, z: 0} + - {x: 352.38016, y: 182.96828, z: 0} +--- !u!1 &1977215286 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1977215289} + - component: {fileID: 1977215288} + - component: {fileID: 1977215287} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1977215287 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1977215286} + 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 &1977215288 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1977215286} + 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 &1977215289 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1977215286} + 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: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2104331181 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2104331182} + - component: {fileID: 2104331183} + m_Layer: 0 + m_Name: TopRefCurve + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2104331182 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2104331181} + 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: 1754131481} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2104331183 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2104331181} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 983a3e151cd916d4faf111dc86266574, type: 3} + m_Name: + m_EditorClassIdentifier: + controlPoints: + - {x: -24.149258, y: 8.542312, z: 0} + - {x: -7.3289404, y: 7.9465704, z: 0} + - {x: 9.06646, y: 8.505926, z: 0} + - {x: 24.59381, y: 10.166003, z: 0} diff --git a/Examples/CurlyUI/CurlyUIDemo.unity.meta b/Examples/CurlyUI/CurlyUIDemo.unity.meta new file mode 100644 index 0000000..ba9117e --- /dev/null +++ b/Examples/CurlyUI/CurlyUIDemo.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3fcaf2574bec7db4db33947995886a8c +timeCreated: 1501406849 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView.meta b/Examples/FancyScrollView.meta new file mode 100644 index 0000000..2d6def2 --- /dev/null +++ b/Examples/FancyScrollView.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e4715bcc5adadca46ac601c64bd58681 +folderAsset: yes +timeCreated: 1501610666 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic.meta b/Examples/FancyScrollView/01_Basic.meta new file mode 100644 index 0000000..0520b51 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0e019a51b207adf4dbc65576e8a03ed9 +folderAsset: yes +timeCreated: 1501610675 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic/01_BasicScene.unity b/Examples/FancyScrollView/01_Basic/01_BasicScene.unity new file mode 100644 index 0000000..627eb27 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/01_BasicScene.unity @@ -0,0 +1,706 @@ +%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: 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.37311947, g: 0.38074005, b: 0.35872722, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + 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 &650160435 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 650160439} + - component: {fileID: 650160438} + - component: {fileID: 650160437} + - component: {fileID: 650160436} + - component: {fileID: 650160440} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &650160436 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &650160437 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &650160438 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 1 + m_Camera: {fileID: 777088607} + 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 &650160439 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1492537696} + 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!114 &650160440 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 69123a589054bf041ba5ead99364646f, type: 3} + m_Name: + m_EditorClassIdentifier: + scrollView: {fileID: 1492537700} +--- !u!1 &777088603 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 777088608} + - component: {fileID: 777088607} + - component: {fileID: 777088606} + - component: {fileID: 777088605} + - component: {fileID: 777088604} + 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 &777088604 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!124 &777088605 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!92 &777088606 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!20 &777088607 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, 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: 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &777088608 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1012097242 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1012097243} + - component: {fileID: 1012097245} + - component: {fileID: 1012097244} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1012097243 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} + m_LocalRotation: {x: 0.5, y: 0, z: 0, w: 0.8660254} + m_LocalPosition: {x: 0, y: 0, z: 276} + m_LocalScale: {x: 0.3, y: 0.3, z: 1} + m_Children: + - {fileID: 1506879310} + m_Father: {fileID: 1590362722} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 60, y: 0, z: 0} + m_AnchorMin: {x: -0.2, y: 0.5} + m_AnchorMax: {x: -0.2, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 200, y: 450} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1012097244 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} + 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: 0.3019608} + 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: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1012097245 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} +--- !u!1 &1492537695 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1492537696} + - component: {fileID: 1492537700} + - component: {fileID: 1492537699} + - component: {fileID: 1492537702} + - component: {fileID: 1492537701} + m_Layer: 5 + m_Name: ScrollView + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1492537696 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + 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: 1590362722} + m_Father: {fileID: 650160439} + 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 &1492537699 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cc9ad31350b1b6348b57c626195a562d, type: 3} + m_Name: + m_EditorClassIdentifier: + viewport: {fileID: 1492537696} + directionOfRecognize: 1 + movementType: 1 + elasticity: 0.1 + scrollSensitivity: 7 + inertia: 1 + decelerationRate: 0.03 + snap: + Enable: 1 + VelocityThreshold: 0.5 + Duration: 0.3 + dataCount: 0 +--- !u!114 &1492537700 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c7e0222f92bdad84c9ee57a127efe088, type: 3} + m_Name: + m_EditorClassIdentifier: + cellInterval: 0.15 + cellOffset: 0.5 + loop: 0 + cellBase: {fileID: 1590362721} + scrollPositionController: {fileID: 1492537699} +--- !u!114 &1492537701 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + 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: 10907, 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!222 &1492537702 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} +--- !u!1 &1506879309 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1506879310} + - component: {fileID: 1506879312} + - component: {fileID: 1506879311} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1506879310 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} + m_LocalRotation: {x: 0.008726558, y: 0, z: 0, w: 0.999962} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1012097243} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 1, 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: 160, y: 35} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1506879311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 3 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1506879312 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} +--- !u!1 &1590362721 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1590362722} + - component: {fileID: 1590362725} + - component: {fileID: 1590362723} + - component: {fileID: 1590362724} + - component: {fileID: 1590362726} + m_Layer: 5 + m_Name: Cell + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1590362722 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + 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: 1012097243} + m_Father: {fileID: 1492537696} + 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!95 &1590362723 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 8bbdb068c73989c438aef167096a86cb, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!114 &1590362724 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b77a04c729f174c478baf21a47c16620, type: 3} + m_Name: + m_EditorClassIdentifier: + animator: {fileID: 1590362723} + message: {fileID: 1506879311} +--- !u!222 &1590362725 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} +--- !u!225 &1590362726 +CanvasGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &1770868449 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1770868452} + - component: {fileID: 1770868451} + - component: {fileID: 1770868450} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1770868450 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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 &1770868451 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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 &1770868452 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Examples/FancyScrollView/01_Basic/01_BasicScene.unity.meta b/Examples/FancyScrollView/01_Basic/01_BasicScene.unity.meta new file mode 100644 index 0000000..f73f85f --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/01_BasicScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f5666b6c719a9b544ab322e1066aef5f +timeCreated: 1487186707 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic/Animations.meta b/Examples/FancyScrollView/01_Basic/Animations.meta new file mode 100644 index 0000000..26c8a54 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Animations.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0f8e29708d324ea48ba2af889fea2c5a +folderAsset: yes +timeCreated: 1487186581 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic/Animations/01_Basic_Animation.anim b/Examples/FancyScrollView/01_Basic/Animations/01_Basic_Animation.anim new file mode 100644 index 0000000..aa47812 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Animations/01_Basic_Animation.anim @@ -0,0 +1,600 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: 01_Basic_Animation + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: {x: 90, y: 0, z: 0} + inSlope: {x: -198.47397, y: 0, z: 0} + outSlope: {x: -198.47397, y: 0, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 0.5 + value: {x: 0, y: 0, z: 0} + inSlope: {x: -180, y: 0, z: 0} + outSlope: {x: -180, y: 0, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: {x: -90, y: 0, z: 0} + inSlope: {x: -178.53796, y: 0, z: 0} + outSlope: {x: -178.53796, y: 0, z: 0} + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Image + m_PositionCurves: [] + m_ScaleCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: {x: 0.3, y: 0.3, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 0.5 + value: {x: 1, y: 1, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: {x: 0.2, y: 0.2, z: 1} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Image + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0.5 + inSlope: 1.4000001 + outSlope: 1.4000001 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 1.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchorMax.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchorMax.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0.5 + inSlope: 1.4000001 + outSlope: 1.4000001 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 1.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchorMin.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchorMin.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: + classID: 225 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - path: 83635035 + attribute: 4 + script: {fileID: 0} + classID: 4 + customType: 14 + isPPtrCurve: 0 + - path: 83635035 + attribute: 3 + script: {fileID: 0} + classID: 4 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 2711263438 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 2089119715 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 0 + attribute: 1574349066 + script: {fileID: 0} + classID: 225 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 3600656472 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 193093493 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0.5 + inSlope: 1.4000001 + outSlope: 1.4000001 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 1.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchorMax.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchorMax.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0.5 + inSlope: 1.4000001 + outSlope: 1.4000001 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 1.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchorMin.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchorMin.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.3 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.3 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0.2 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalScale.z + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 90 + inSlope: -198.47397 + outSlope: -198.47397 + tangentMode: 0 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: -180 + outSlope: -180 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: -90 + inSlope: -178.53796 + outSlope: -178.53796 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: + classID: 225 + script: {fileID: 0} + m_EulerEditorCurves: + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: Image + classID: 224 + script: {fileID: 0} + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_IsEmpty: 0 + m_Events: [] diff --git a/Examples/FancyScrollView/01_Basic/Animations/01_Basic_Animation.anim.meta b/Examples/FancyScrollView/01_Basic/Animations/01_Basic_Animation.anim.meta new file mode 100644 index 0000000..83f1fac --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Animations/01_Basic_Animation.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9e6e4c5500df9dc439749ba892b2995c +timeCreated: 1487186596 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic/Animations/01_Basic_CellScroll.controller b/Examples/FancyScrollView/01_Basic/Animations/01_Basic_CellScroll.controller new file mode 100644 index 0000000..9b8d31d --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Animations/01_Basic_CellScroll.controller @@ -0,0 +1,95 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: 01_Basic_CellScroll + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: scroll + m_Type: 9 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 1 + m_Controller: {fileID: 9100000} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 1107904440216339570} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1101 &1101181072344081740 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 1102900943980948860} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.1 + m_TransitionOffset: 0 + m_ExitTime: 0.9 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1102 &1102900943980948860 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: scroll + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 9e6e4c5500df9dc439749ba892b2995c, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: +--- !u!1107 &1107904440216339570 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 1102900943980948860} + m_Position: {x: 252, y: 24, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: + - {fileID: 1101181072344081740} + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 1102900943980948860} diff --git a/Examples/FancyScrollView/01_Basic/Animations/01_Basic_CellScroll.controller.meta b/Examples/FancyScrollView/01_Basic/Animations/01_Basic_CellScroll.controller.meta new file mode 100644 index 0000000..59097c2 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Animations/01_Basic_CellScroll.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8bbdb068c73989c438aef167096a86cb +timeCreated: 1487186612 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic/Example01CellDto.cs b/Examples/FancyScrollView/01_Basic/Example01CellDto.cs new file mode 100644 index 0000000..9cfb5d7 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Example01CellDto.cs @@ -0,0 +1,7 @@ +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example01CellDto + { + public string Message; + } +} diff --git a/Examples/FancyScrollView/01_Basic/Example01CellDto.cs.meta b/Examples/FancyScrollView/01_Basic/Example01CellDto.cs.meta new file mode 100644 index 0000000..220ee03 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Example01CellDto.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e14503efd7a60d54db0d148e00aa2169 +timeCreated: 1487508481 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic/Example01Scene.cs b/Examples/FancyScrollView/01_Basic/Example01Scene.cs new file mode 100644 index 0000000..1212164 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Example01Scene.cs @@ -0,0 +1,19 @@ +using System.Linq; + +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example01Scene : MonoBehaviour + { + [SerializeField] + Example01ScrollView scrollView; + + void Start() + { + var cellData = Enumerable.Range(0, 20) + .Select(i => new Example01CellDto { Message = "Cell " + i }) + .ToList(); + + scrollView.UpdateData(cellData); + } + } +} diff --git a/Examples/FancyScrollView/01_Basic/Example01Scene.cs.meta b/Examples/FancyScrollView/01_Basic/Example01Scene.cs.meta new file mode 100644 index 0000000..856450e --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Example01Scene.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 69123a589054bf041ba5ead99364646f +timeCreated: 1487186233 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic/Example01ScrollView.cs b/Examples/FancyScrollView/01_Basic/Example01ScrollView.cs new file mode 100644 index 0000000..91a03ab --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Example01ScrollView.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example01ScrollView : FancyScrollView + { + + [SerializeField] + ScrollPositionController scrollPositionController; + + new void Awake() + { + base.Awake(); + scrollPositionController.OnUpdatePosition.AddListener(UpdatePosition); + } + + public void UpdateData(List data) + { + cellData = data; + scrollPositionController.SetDataCount(cellData.Count); + UpdateContents(); + } + } +} diff --git a/Examples/FancyScrollView/01_Basic/Example01ScrollView.cs.meta b/Examples/FancyScrollView/01_Basic/Example01ScrollView.cs.meta new file mode 100644 index 0000000..a9da031 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Example01ScrollView.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c7e0222f92bdad84c9ee57a127efe088 +timeCreated: 1487262733 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/01_Basic/Example01ScrollViewCell.cs b/Examples/FancyScrollView/01_Basic/Example01ScrollViewCell.cs new file mode 100644 index 0000000..a35b7f7 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Example01ScrollViewCell.cs @@ -0,0 +1,40 @@ +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example01ScrollViewCell : FancyScrollViewCell + { + [SerializeField] + Animator animator; + [SerializeField] + Text message; + + readonly int scrollTriggerHash = Animator.StringToHash("scroll"); + + void Start() + { + var rectTransform = transform as RectTransform; + rectTransform.anchorMax = Vector2.one; + rectTransform.anchorMin = Vector2.zero; + rectTransform.anchoredPosition3D = Vector3.zero; + UpdatePosition(0); + } + + /// + /// セルの内容を更新します + /// + /// + public override void UpdateContent(Example01CellDto itemData) + { + message.text = itemData.Message; + } + + /// + /// セルの位置を更新します + /// + /// + public override void UpdatePosition(float position) + { + animator.Play(scrollTriggerHash, -1, position); + animator.speed = 0; + } + } +} diff --git a/Examples/FancyScrollView/01_Basic/Example01ScrollViewCell.cs.meta b/Examples/FancyScrollView/01_Basic/Example01ScrollViewCell.cs.meta new file mode 100644 index 0000000..826e107 --- /dev/null +++ b/Examples/FancyScrollView/01_Basic/Example01ScrollViewCell.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b77a04c729f174c478baf21a47c16620 +timeCreated: 1487184978 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/02_CellEventHandling.meta b/Examples/FancyScrollView/02_CellEventHandling.meta new file mode 100644 index 0000000..b4f0cd4 --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 577dcbd98667cbb47ba8c97b564802d2 +folderAsset: yes +timeCreated: 1501610675 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/02_CellEventHandling/02_CellEventHandling.unity b/Examples/FancyScrollView/02_CellEventHandling/02_CellEventHandling.unity new file mode 100644 index 0000000..6a07247 --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/02_CellEventHandling.unity @@ -0,0 +1,750 @@ +%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: 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.37311947, g: 0.38074005, b: 0.35872722, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + 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 &650160435 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 650160439} + - component: {fileID: 650160438} + - component: {fileID: 650160437} + - component: {fileID: 650160436} + - component: {fileID: 650160440} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &650160436 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &650160437 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &650160438 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 1 + m_Camera: {fileID: 777088607} + 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 &650160439 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1492537696} + 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!114 &650160440 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b945ba693af0d824989e76c183a47fb3, type: 3} + m_Name: + m_EditorClassIdentifier: + scrollView: {fileID: 1492537697} +--- !u!1 &777088603 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 777088608} + - component: {fileID: 777088607} + - component: {fileID: 777088606} + - component: {fileID: 777088605} + - component: {fileID: 777088604} + 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 &777088604 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!124 &777088605 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!92 &777088606 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!20 &777088607 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, 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: 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &777088608 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1012097242 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1012097243} + - component: {fileID: 1012097245} + - component: {fileID: 1012097244} + - component: {fileID: 1012097246} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1012097243 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} + m_LocalRotation: {x: 0.5, y: 0, z: 0, w: 0.8660254} + m_LocalPosition: {x: 0, y: 0, z: 276} + m_LocalScale: {x: 0.3, y: 0.3, z: 1} + m_Children: + - {fileID: 1506879310} + m_Father: {fileID: 1590362722} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 60, y: 0, z: 0} + m_AnchorMin: {x: -0.2, y: 0.5} + m_AnchorMax: {x: -0.2, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 200, y: 450} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1012097244 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} + 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: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1012097245 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} +--- !u!114 &1012097246 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, 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: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1012097244} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1492537695 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1492537696} + - component: {fileID: 1492537699} + - component: {fileID: 1492537702} + - component: {fileID: 1492537701} + - component: {fileID: 1492537697} + m_Layer: 5 + m_Name: ScrollView + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1492537696 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + 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: 1590362722} + m_Father: {fileID: 650160439} + 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 &1492537697 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5b1ee62a075132e49b6fc82cd114e89d, type: 3} + m_Name: + m_EditorClassIdentifier: + cellInterval: 0.15 + cellOffset: 0.5 + loop: 0 + cellBase: {fileID: 1590362721} + scrollPositionController: {fileID: 1492537699} +--- !u!114 &1492537699 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cc9ad31350b1b6348b57c626195a562d, type: 3} + m_Name: + m_EditorClassIdentifier: + viewport: {fileID: 1492537696} + directionOfRecognize: 1 + movementType: 1 + elasticity: 0.1 + scrollSensitivity: 7 + inertia: 1 + decelerationRate: 0.03 + snap: + Enable: 1 + VelocityThreshold: 0.5 + Duration: 0.3 + dataCount: 0 +--- !u!114 &1492537701 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + 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: 10907, 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!222 &1492537702 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} +--- !u!1 &1506879309 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1506879310} + - component: {fileID: 1506879312} + - component: {fileID: 1506879311} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1506879310 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} + m_LocalRotation: {x: 0.008726558, y: 0, z: 0, w: 0.999962} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1012097243} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 1, 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: 160, y: 35} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1506879311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 3 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1506879312 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} +--- !u!1 &1590362721 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1590362722} + - component: {fileID: 1590362725} + - component: {fileID: 1590362723} + - component: {fileID: 1590362724} + - component: {fileID: 1590362726} + m_Layer: 5 + m_Name: Cell + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1590362722 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + 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: 1012097243} + m_Father: {fileID: 1492537696} + 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!95 &1590362723 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 8bbdb068c73989c438aef167096a86cb, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!114 &1590362724 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9409f360a0deeb949a3635126edf8000, type: 3} + m_Name: + m_EditorClassIdentifier: + animator: {fileID: 1590362723} + message: {fileID: 1506879311} + image: {fileID: 1012097244} + button: {fileID: 1012097246} +--- !u!222 &1590362725 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} +--- !u!225 &1590362726 +CanvasGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &1770868449 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1770868452} + - component: {fileID: 1770868451} + - component: {fileID: 1770868450} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1770868450 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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 &1770868451 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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 &1770868452 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Examples/FancyScrollView/02_CellEventHandling/02_CellEventHandling.unity.meta b/Examples/FancyScrollView/02_CellEventHandling/02_CellEventHandling.unity.meta new file mode 100644 index 0000000..32d19cb --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/02_CellEventHandling.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22d1be941599faf45b04ab4c6a2def09 +timeCreated: 1487505810 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02CellDto.cs b/Examples/FancyScrollView/02_CellEventHandling/Example02CellDto.cs new file mode 100644 index 0000000..b3f1a83 --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02CellDto.cs @@ -0,0 +1,7 @@ +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example02CellDto + { + public string Message; + } +} diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02CellDto.cs.meta b/Examples/FancyScrollView/02_CellEventHandling/Example02CellDto.cs.meta new file mode 100644 index 0000000..9ad4a3c --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02CellDto.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cf9eb20bd16f1aa448580b085861a75b +timeCreated: 1487505929 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02Scene.cs b/Examples/FancyScrollView/02_CellEventHandling/Example02Scene.cs new file mode 100644 index 0000000..0684e5a --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02Scene.cs @@ -0,0 +1,19 @@ +using System.Linq; + +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example02Scene : MonoBehaviour + { + [SerializeField] + Example02ScrollView scrollView; + + void Start() + { + var cellData = Enumerable.Range(0, 20) + .Select(i => new Example02CellDto { Message = "Cell " + i }) + .ToList(); + + scrollView.UpdateData(cellData); + } + } +} diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02Scene.cs.meta b/Examples/FancyScrollView/02_CellEventHandling/Example02Scene.cs.meta new file mode 100644 index 0000000..29cff92 --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02Scene.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b945ba693af0d824989e76c183a47fb3 +timeCreated: 1487506430 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollView.cs b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollView.cs new file mode 100644 index 0000000..d1e56c9 --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollView.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example02ScrollView : FancyScrollView + { + [SerializeField] + ScrollPositionController scrollPositionController; + + new void Awake() + { + scrollPositionController.OnUpdatePosition.AddListener(UpdatePosition); + SetContext(new Example02ScrollViewContext { OnPressedCell = OnPressedCell }); + base.Awake(); + } + + public void UpdateData(List data) + { + cellData = data; + scrollPositionController.SetDataCount(cellData.Count); + UpdateContents(); + } + + void OnPressedCell(Example02ScrollViewCell cell) + { + scrollPositionController.ScrollTo(cell.DataIndex, 0.4f); + context.SelectedIndex = cell.DataIndex; + UpdateContents(); + } + } +} diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollView.cs.meta b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollView.cs.meta new file mode 100644 index 0000000..af0e6af --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollView.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5b1ee62a075132e49b6fc82cd114e89d +timeCreated: 1487505830 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewCell.cs b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewCell.cs new file mode 100644 index 0000000..31d3ce3 --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewCell.cs @@ -0,0 +1,73 @@ +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example02ScrollViewCell + : FancyScrollViewCell + { + [SerializeField] + Animator animator; + [SerializeField] + Text message; + [SerializeField] + Image image; + [SerializeField] + Button button; + + readonly int scrollTriggerHash = Animator.StringToHash("scroll"); + Example02ScrollViewContext context; + + void Start() + { + var rectTransform = transform as RectTransform; + rectTransform.anchorMax = Vector2.one; + rectTransform.anchorMin = Vector2.zero; + rectTransform.anchoredPosition3D = Vector3.zero; + UpdatePosition(0); + + button.onClick.AddListener(OnPressedCell); + } + + /// + /// コンテキストを設定します + /// + /// + public override void SetContext(Example02ScrollViewContext context) + { + this.context = context; + } + + /// + /// セルの内容を更新します + /// + /// + public override void UpdateContent(Example02CellDto itemData) + { + message.text = itemData.Message; + + if (context != null) + { + var isSelected = context.SelectedIndex == DataIndex; + image.color = isSelected + ? new Color32(0, 255, 255, 100) + : new Color32(255, 255, 255, 77); + } + } + + /// + /// セルの位置を更新します + /// + /// + public override void UpdatePosition(float position) + { + animator.Play(scrollTriggerHash, -1, position); + animator.speed = 0; + } + + public void OnPressedCell() + { + if (context != null) + { + context.OnPressedCell(this); + } + } + } +} diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewCell.cs.meta b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewCell.cs.meta new file mode 100644 index 0000000..9092214 --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewCell.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9409f360a0deeb949a3635126edf8000 +timeCreated: 1487505842 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewContext.cs b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewContext.cs new file mode 100644 index 0000000..fdfd6fd --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewContext.cs @@ -0,0 +1,8 @@ +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example02ScrollViewContext + { + public System.Action OnPressedCell; + public int SelectedIndex; + } +} diff --git a/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewContext.cs.meta b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewContext.cs.meta new file mode 100644 index 0000000..d2ec0bc --- /dev/null +++ b/Examples/FancyScrollView/02_CellEventHandling/Example02ScrollViewContext.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 82429dd602c927c4faab5b80397e65a3 +timeCreated: 1487505870 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll.meta b/Examples/FancyScrollView/03_InfiniteScroll.meta new file mode 100644 index 0000000..df80474 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d648997d940777f41b77d17ab29f5cea +folderAsset: yes +timeCreated: 1501610675 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/03_InfiniteScroll.unity b/Examples/FancyScrollView/03_InfiniteScroll/03_InfiniteScroll.unity new file mode 100644 index 0000000..3953772 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/03_InfiniteScroll.unity @@ -0,0 +1,755 @@ +%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: 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.37311947, g: 0.38074005, b: 0.35872722, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + 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 &650160435 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 650160439} + - component: {fileID: 650160438} + - component: {fileID: 650160437} + - component: {fileID: 650160436} + - component: {fileID: 650160440} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &650160436 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &650160437 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &650160438 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 1 + m_Camera: {fileID: 777088607} + 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 &650160439 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1492537696} + 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!114 &650160440 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 650160435} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45018617dd0e7cf4d8b8800224ac5d40, type: 3} + m_Name: + m_EditorClassIdentifier: + scrollView: {fileID: 1492537697} +--- !u!1 &777088603 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 777088608} + - component: {fileID: 777088607} + - component: {fileID: 777088606} + - component: {fileID: 777088605} + - component: {fileID: 777088604} + 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 &777088604 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!124 &777088605 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!92 &777088606 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 +--- !u!20 &777088607 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, 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: 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &777088608 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777088603} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1012097242 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1012097243} + - component: {fileID: 1012097245} + - component: {fileID: 1012097244} + - component: {fileID: 1012097246} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1012097243 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} + m_LocalRotation: {x: 0.6427876, y: 0, z: 0, w: 0.7660445} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.8, y: 0.8, z: 1} + m_Children: + - {fileID: 1506879310} + m_Father: {fileID: 1590362722} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -80, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.7} + m_AnchorMax: {x: 0.5, y: 0.7} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 200, y: 400} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1012097244 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} + 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: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1012097245 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} +--- !u!114 &1012097246 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1012097242} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, 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: 0 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1012097244} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1492537695 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1492537696} + - component: {fileID: 1492537699} + - component: {fileID: 1492537702} + - component: {fileID: 1492537701} + - component: {fileID: 1492537697} + m_Layer: 5 + m_Name: ScrollView + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1492537696 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + 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: 1590362722} + m_Father: {fileID: 650160439} + 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 &1492537697 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7454b91158ad32e49ab5d3cdac132574, type: 3} + m_Name: + m_EditorClassIdentifier: + cellInterval: 0.06666667 + cellOffset: 0.5 + loop: 1 + cellBase: {fileID: 1590362721} + scrollPositionController: {fileID: 1492537699} +--- !u!114 &1492537699 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cc9ad31350b1b6348b57c626195a562d, type: 3} + m_Name: + m_EditorClassIdentifier: + viewport: {fileID: 1492537696} + directionOfRecognize: 1 + movementType: 0 + elasticity: 0.1 + scrollSensitivity: 7 + inertia: 1 + decelerationRate: 0.03 + snap: + Enable: 1 + VelocityThreshold: 0.5 + Duration: 0.3 + dataCount: 0 + OnUpdatePosition: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Extensions.ScrollPositionController+UpdatePositionEvent, + Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null +--- !u!114 &1492537701 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + 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: 10907, 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!222 &1492537702 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1492537695} +--- !u!1 &1506879309 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1506879310} + - component: {fileID: 1506879312} + - component: {fileID: 1506879311} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1506879310 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} + m_LocalRotation: {x: 0.008726558, y: 0, z: 0, w: 0.999962} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1012097243} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 1, 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: 160, y: 35} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1506879311 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 30 + m_FontStyle: 3 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1506879312 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1506879309} +--- !u!1 &1590362721 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1590362722} + - component: {fileID: 1590362725} + - component: {fileID: 1590362723} + - component: {fileID: 1590362724} + - component: {fileID: 1590362728} + m_Layer: 5 + m_Name: Cell + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1590362722 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_LocalRotation: {x: -0, y: -0.026176924, z: -0.99965733, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1012097243} + m_Father: {fileID: 1492537696} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: -3, y: 0, z: -180} + 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: 980, y: 552} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!95 &1590362723 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: c1a16bf117472bf47b662d4bc2647177, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!114 &1590362724 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 173c545de5ff4e048bcc3642f8392e4e, type: 3} + m_Name: + m_EditorClassIdentifier: + animator: {fileID: 1590362723} + message: {fileID: 1506879311} + image: {fileID: 1012097244} + button: {fileID: 1012097246} +--- !u!222 &1590362725 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} +--- !u!225 &1590362728 +CanvasGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1590362721} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &1770868449 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1770868452} + - component: {fileID: 1770868451} + - component: {fileID: 1770868450} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1770868450 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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 &1770868451 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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 &1770868452 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1770868449} + 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: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Examples/FancyScrollView/03_InfiniteScroll/03_InfiniteScroll.unity.meta b/Examples/FancyScrollView/03_InfiniteScroll/03_InfiniteScroll.unity.meta new file mode 100644 index 0000000..d7534c5 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/03_InfiniteScroll.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1f93c60c8aa572040a751a20a626451f +timeCreated: 1487505810 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Animations.meta b/Examples/FancyScrollView/03_InfiniteScroll/Animations.meta new file mode 100644 index 0000000..82c7dcb --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Animations.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 94b9a5282934b8c43b2aeb7a25815a99 +folderAsset: yes +timeCreated: 1488028867 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_Animation.anim b/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_Animation.anim new file mode 100644 index 0000000..a541fd7 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_Animation.anim @@ -0,0 +1,468 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: 03_InfiniteScroll_Animation + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: {x: 0, y: 0, z: -250} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 0.5 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 0, z: 450} + outSlope: {x: 0, y: 0, z: 450} + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: {x: 0, y: 0, z: 200} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: {x: 80, y: -80, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 0.5 + value: {x: 0, y: 0, z: 0} + inSlope: {x: 0, y: 160, z: 0} + outSlope: {x: 0, y: 160, z: 0} + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: {x: 80, y: 80, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: Image + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: + classID: 225 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -250 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 250 + inSlope: 2000 + outSlope: 2000 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 2750 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 224 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - path: 0 + attribute: 4 + script: {fileID: 0} + classID: 4 + customType: 14 + isPPtrCurve: 0 + - path: 83635035 + attribute: 4 + script: {fileID: 0} + classID: 4 + customType: 14 + isPPtrCurve: 0 + - path: 0 + attribute: 1574349066 + script: {fileID: 0} + classID: 225 + customType: 0 + isPPtrCurve: 0 + - path: 0 + attribute: 2033536083 + script: {fileID: 0} + classID: 224 + customType: 28 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -250 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: 450 + outSlope: 450 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 200 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 80 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 80 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -80 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: 160 + outSlope: 160 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 80 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: localEulerAnglesRaw.z + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_Alpha + path: + classID: 225 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -250 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + - serializedVersion: 2 + time: 0.5 + value: 250 + inSlope: 2000 + outSlope: 2000 + tangentMode: 136 + - serializedVersion: 2 + time: 1 + value: 2750 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 224 + script: {fileID: 0} + m_EulerEditorCurves: + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalEulerAngles.z + path: Image + classID: 224 + script: {fileID: 0} + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_IsEmpty: 0 + m_Events: [] diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_Animation.anim.meta b/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_Animation.anim.meta new file mode 100644 index 0000000..df6b1ed --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_Animation.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: add491cbb06317b48a88a94b0081db1d +timeCreated: 1487186596 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_CellScroll.controller b/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_CellScroll.controller new file mode 100644 index 0000000..86c8605 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_CellScroll.controller @@ -0,0 +1,121 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: 03_InfiniteScroll_CellScroll + serializedVersion: 5 + m_AnimatorParameters: + - m_Name: scroll + m_Type: 9 + m_DefaultFloat: 0 + m_DefaultInt: 0 + m_DefaultBool: 1 + m_Controller: {fileID: 9100000} + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 1107904440216339570} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1101 &1101181072344081740 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 1102900943980948860} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0.1 + m_TransitionOffset: 0 + m_ExitTime: 0.9 + m_HasExitTime: 0 + m_HasFixedDuration: 1 + m_InterruptionSource: 0 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 +--- !u!1102 &1102483224443493760 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: New State + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_Motion: {fileID: 0} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: +--- !u!1102 &1102900943980948860 +AnimatorState: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: scroll + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_Motion: {fileID: 7400000, guid: add491cbb06317b48a88a94b0081db1d, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: +--- !u!1107 &1107904440216339570 +AnimatorStateMachine: + serializedVersion: 5 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 1102483224443493760} + m_Position: {x: 264, y: 144, z: 0} + - serializedVersion: 1 + m_State: {fileID: 1102900943980948860} + m_Position: {x: 252, y: 24, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: + - {fileID: 1101181072344081740} + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 1102483224443493760} diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_CellScroll.controller.meta b/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_CellScroll.controller.meta new file mode 100644 index 0000000..b89da69 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Animations/03_InfiniteScroll_CellScroll.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c1a16bf117472bf47b662d4bc2647177 +timeCreated: 1487186612 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03CellDto.cs b/Examples/FancyScrollView/03_InfiniteScroll/Example03CellDto.cs new file mode 100644 index 0000000..f84fd25 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03CellDto.cs @@ -0,0 +1,7 @@ +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example03CellDto + { + public string Message; + } +} diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03CellDto.cs.meta b/Examples/FancyScrollView/03_InfiniteScroll/Example03CellDto.cs.meta new file mode 100644 index 0000000..8ba8e07 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03CellDto.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f620c6407f9b6c74390ab02bfa99d777 +timeCreated: 1487505929 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03Scene.cs b/Examples/FancyScrollView/03_InfiniteScroll/Example03Scene.cs new file mode 100644 index 0000000..1e07d18 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03Scene.cs @@ -0,0 +1,19 @@ +using System.Linq; + +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example03Scene : MonoBehaviour + { + [SerializeField] + Example03ScrollView scrollView; + + void Start() + { + var cellData = Enumerable.Range(0, 20) + .Select(i => new Example03CellDto { Message = "Cell " + i }) + .ToList(); + + scrollView.UpdateData(cellData); + } + } +} diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03Scene.cs.meta b/Examples/FancyScrollView/03_InfiniteScroll/Example03Scene.cs.meta new file mode 100644 index 0000000..b69367b --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03Scene.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 45018617dd0e7cf4d8b8800224ac5d40 +timeCreated: 1487506430 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollView.cs b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollView.cs new file mode 100644 index 0000000..c51e273 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollView.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example03ScrollView : FancyScrollView + { + [SerializeField] + ScrollPositionController scrollPositionController; + + new void Awake() + { + scrollPositionController.OnUpdatePosition.AddListener(UpdatePosition); + SetContext(new Example03ScrollViewContext { OnPressedCell = OnPressedCell }); + base.Awake(); + } + + public void UpdateData(List data) + { + cellData = data; + scrollPositionController.SetDataCount(cellData.Count); + UpdateContents(); + } + + void OnPressedCell(Example03ScrollViewCell cell) + { + scrollPositionController.ScrollTo(cell.DataIndex, 0.4f); + context.SelectedIndex = cell.DataIndex; + UpdateContents(); + } + + } +} diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollView.cs.meta b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollView.cs.meta new file mode 100644 index 0000000..b5f7a1b --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollView.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7454b91158ad32e49ab5d3cdac132574 +timeCreated: 1487505830 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewCell.cs b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewCell.cs new file mode 100644 index 0000000..3318fea --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewCell.cs @@ -0,0 +1,73 @@ +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example03ScrollViewCell + : FancyScrollViewCell + { + [SerializeField] + Animator animator; + [SerializeField] + Text message; + [SerializeField] + Image image; + [SerializeField] + Button button; + + readonly int scrollTriggerHash = Animator.StringToHash("scroll"); + Example03ScrollViewContext context; + + void Start() + { + var rectTransform = transform as RectTransform; + rectTransform.anchorMax = Vector2.one; + rectTransform.anchorMin = Vector2.zero; + rectTransform.anchoredPosition3D = Vector3.zero; + UpdatePosition(0); + + button.onClick.AddListener(OnPressedCell); + } + + /// + /// コンテキストを設定します + /// + /// + public override void SetContext(Example03ScrollViewContext context) + { + this.context = context; + } + + /// + /// セルの内容を更新します + /// + /// + public override void UpdateContent(Example03CellDto itemData) + { + message.text = itemData.Message; + + if (context != null) + { + var isSelected = context.SelectedIndex == DataIndex; + image.color = isSelected + ? new Color32(0, 255, 255, 100) + : new Color32(255, 255, 255, 77); + } + } + + /// + /// セルの位置を更新します + /// + /// + public override void UpdatePosition(float position) + { + animator.Play(scrollTriggerHash, -1, position); + animator.speed = 0; + } + + public void OnPressedCell() + { + if (context != null) + { + context.OnPressedCell(this); + } + } + } +} diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewCell.cs.meta b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewCell.cs.meta new file mode 100644 index 0000000..5d437a8 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewCell.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 173c545de5ff4e048bcc3642f8392e4e +timeCreated: 1487505842 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewContext.cs b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewContext.cs new file mode 100644 index 0000000..ecb1eaa --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewContext.cs @@ -0,0 +1,8 @@ +namespace UnityEngine.UI.Extensions.Examples +{ + public class Example03ScrollViewContext + { + public System.Action OnPressedCell; + public int SelectedIndex; + } +} diff --git a/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewContext.cs.meta b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewContext.cs.meta new file mode 100644 index 0000000..ad6e507 --- /dev/null +++ b/Examples/FancyScrollView/03_InfiniteScroll/Example03ScrollViewContext.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 90b3672ca30312045afd42deb38c2f6e +timeCreated: 1487505870 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/HSS-VSS-ScrollSnap/PaginationScript.cs b/Examples/HSS-VSS-ScrollSnap/PaginationScript.cs new file mode 100644 index 0000000..f2f0b0c --- /dev/null +++ b/Examples/HSS-VSS-ScrollSnap/PaginationScript.cs @@ -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); + } + } + } +} \ No newline at end of file diff --git a/Examples/HSS-VSS-ScrollSnap/PaginationScript.cs.meta b/Examples/HSS-VSS-ScrollSnap/PaginationScript.cs.meta new file mode 100644 index 0000000..a550473 --- /dev/null +++ b/Examples/HSS-VSS-ScrollSnap/PaginationScript.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5ea46c3573b42624aa573f2d6b091ed1 +timeCreated: 1501404313 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/HSS-VSS-ScrollSnap/ScrollSnapManagedTests.unity b/Examples/HSS-VSS-ScrollSnap/ScrollSnapManagedTests.unity index 2e78934..7494927 100644 --- a/Examples/HSS-VSS-ScrollSnap/ScrollSnapManagedTests.unity +++ b/Examples/HSS-VSS-ScrollSnap/ScrollSnapManagedTests.unity @@ -141,12 +141,12 @@ RectTransform: - {fileID: 2093228243} - {fileID: 1673151533} m_Father: {fileID: 448991457} - m_RootOrder: 5 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 259, y: -106} - m_SizeDelta: {x: -577, y: -279} + m_AnchoredPosition: {x: 225.10002, y: -99.100006} + m_SizeDelta: {x: -496.4, y: -233.4} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2641525 MonoBehaviour: @@ -233,7 +233,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -291,6 +291,8 @@ RectTransform: m_Children: - {fileID: 1826600021} - {fileID: 472879517} + - {fileID: 1112321045} + - {fileID: 803284190} m_Father: {fileID: 448991457} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -310,7 +312,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 609dcc22aadcc16418bfac22716ee9a6, type: 3} m_Name: m_EditorClassIdentifier: - StartingScreen: 0 + StartingScreen: 2 PageStep: 2.7 Pagination: {fileID: 266467291} PrevButton: {fileID: 1112321044} @@ -504,7 +506,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Page_01 + m_Text: Page_5 --- !u!222 &96249206 CanvasRenderer: m_ObjectHideFlags: 0 @@ -545,12 +547,12 @@ RectTransform: - {fileID: 896078184} - {fileID: 1096492862} m_Father: {fileID: 448991457} - m_RootOrder: 4 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -18, y: -108} - m_SizeDelta: {x: -651, y: -244} + m_AnchoredPosition: {x: 59.299988, y: -108} + m_SizeDelta: {x: -496.4, y: -244} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &266467293 MonoBehaviour: @@ -595,6 +597,7 @@ GameObject: m_Component: - component: {fileID: 344218386} - component: {fileID: 344218387} + - component: {fileID: 344218388} m_Layer: 5 m_Name: Toggle (3) m_TagString: Untagged @@ -667,6 +670,19 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_IsOn: 1 +--- !u!114 &344218388 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 344218385} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ea46c3573b42624aa573f2d6b091ed1, type: 3} + m_Name: + m_EditorClassIdentifier: + hss: {fileID: 67156823} + Page: 3 --- !u!1 &369849432 GameObject: m_ObjectHideFlags: 0 @@ -830,8 +846,6 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_Children: - {fileID: 67156822} - - {fileID: 1112321045} - - {fileID: 803284190} - {fileID: 1200934015} - {fileID: 266467292} - {fileID: 2641524} @@ -1063,7 +1077,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1506,7 +1520,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Page_01 + m_Text: Page_6 --- !u!222 &580834257 CanvasRenderer: m_ObjectHideFlags: 0 @@ -1647,6 +1661,80 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 628800540} +--- !u!1 &665010633 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 665010634} + - component: {fileID: 665010636} + - component: {fileID: 665010635} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &665010634 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 665010633} + 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: 1530543973} + 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 &665010635 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 665010633} + 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.19607843, g: 0.19607843, b: 0.19607843, 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: Scroll Down +--- !u!222 &665010636 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 665010633} --- !u!1 &675753574 GameObject: m_ObjectHideFlags: 0 @@ -1831,7 +1919,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1882,17 +1970,17 @@ RectTransform: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 803284189} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: 1482741892} - m_Father: {fileID: 448991457} - m_RootOrder: 2 + m_Father: {fileID: 67156822} + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -113.899994, y: -183.2} + m_AnchoredPosition: {x: -96.399994, y: -169.20001} m_SizeDelta: {x: 150, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &803284191 @@ -2179,7 +2267,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Page_01 + m_Text: Page_2 --- !u!222 &871292880 CanvasRenderer: m_ObjectHideFlags: 0 @@ -2195,6 +2283,7 @@ GameObject: m_Component: - component: {fileID: 896078184} - component: {fileID: 896078185} + - component: {fileID: 896078186} m_Layer: 5 m_Name: Toggle (4) m_TagString: Untagged @@ -2267,6 +2356,19 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_IsOn: 1 +--- !u!114 &896078186 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 896078183} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ea46c3573b42624aa573f2d6b091ed1, type: 3} + m_Name: + m_EditorClassIdentifier: + hss: {fileID: 67156823} + Page: 4 --- !u!1 &911861601 GameObject: m_ObjectHideFlags: 0 @@ -2366,6 +2468,8 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1318750537} + - {fileID: 1264033139} + - {fileID: 1530543973} m_Father: {fileID: 1200934015} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -2387,9 +2491,9 @@ MonoBehaviour: m_EditorClassIdentifier: StartingScreen: 5 PageStep: 1.27 - Pagination: {fileID: 266467291} - PrevButton: {fileID: 1112321044} - NextButton: {fileID: 803284189} + Pagination: {fileID: 0} + PrevButton: {fileID: 1530543972} + NextButton: {fileID: 1264033135} transitionSpeed: 7.5 UseFastSwipe: 0 FastSwipeThreshold: 100 @@ -2521,6 +2625,80 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1005665639} +--- !u!1 &1011318431 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1011318432} + - component: {fileID: 1011318434} + - component: {fileID: 1011318433} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1011318432 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1011318431} + 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: 1264033139} + 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 &1011318433 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1011318431} + 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.19607843, g: 0.19607843, b: 0.19607843, 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: "Scroll Up\t" +--- !u!222 &1011318434 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1011318431} --- !u!1 &1045913701 GameObject: m_ObjectHideFlags: 0 @@ -2604,6 +2782,7 @@ GameObject: m_Component: - component: {fileID: 1096492862} - component: {fileID: 1096492863} + - component: {fileID: 1096492864} m_Layer: 5 m_Name: Toggle (5) m_TagString: Untagged @@ -2676,6 +2855,19 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_IsOn: 1 +--- !u!114 &1096492864 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1096492861} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ea46c3573b42624aa573f2d6b091ed1, type: 3} + m_Name: + m_EditorClassIdentifier: + hss: {fileID: 67156823} + Page: 5 --- !u!1 &1112321044 GameObject: m_ObjectHideFlags: 0 @@ -2700,17 +2892,17 @@ RectTransform: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1112321044} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: 1045913702} - m_Father: {fileID: 448991457} - m_RootOrder: 1 + m_Father: {fileID: 67156822} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -326.9, y: -183.2} + m_AnchoredPosition: {x: -309.4, y: -169.20001} m_SizeDelta: {x: 150, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1112321046 @@ -2854,7 +3046,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Page_01 + m_Text: Page_3 --- !u!222 &1113803476 CanvasRenderer: m_ObjectHideFlags: 0 @@ -2959,6 +3151,7 @@ GameObject: m_Component: - component: {fileID: 1196803093} - component: {fileID: 1196803094} + - component: {fileID: 1196803095} m_Layer: 5 m_Name: Toggle m_TagString: Untagged @@ -3031,6 +3224,19 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_IsOn: 1 +--- !u!114 &1196803095 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1196803092} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ea46c3573b42624aa573f2d6b091ed1, type: 3} + m_Name: + m_EditorClassIdentifier: + hss: {fileID: 67156823} + Page: 0 --- !u!1 &1200934014 GameObject: m_ObjectHideFlags: 0 @@ -3059,12 +3265,12 @@ RectTransform: m_Children: - {fileID: 1005665640} m_Father: {fileID: 448991457} - m_RootOrder: 3 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -302, y: -0.125} - m_SizeDelta: {x: -648, y: -27.25} + m_AnchoredPosition: {x: -215, y: -6} + m_SizeDelta: {x: -475, y: -39} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1200934016 MonoBehaviour: @@ -3077,6 +3283,117 @@ MonoBehaviour: m_Script: {fileID: -146154839, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1264033135 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1264033139} + - component: {fileID: 1264033138} + - component: {fileID: 1264033137} + - component: {fileID: 1264033136} + m_Layer: 5 + m_Name: Up Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1264033136 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1264033135} + 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: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1264033137} + 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 &1264033137 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1264033135} + 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!222 &1264033138 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1264033135} +--- !u!224 &1264033139 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1264033135} + 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: 1011318432} + m_Father: {fileID: 1005665640} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -99, y: 114} + m_SizeDelta: {x: 150, y: 30} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1264921919 GameObject: m_ObjectHideFlags: 0 @@ -3968,6 +4285,117 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1522540075} +--- !u!1 &1530543972 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1530543973} + - component: {fileID: 1530543976} + - component: {fileID: 1530543975} + - component: {fileID: 1530543974} + m_Layer: 5 + m_Name: Down Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1530543973 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1530543972} + 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: 665010634} + m_Father: {fileID: 1005665640} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -99, y: -262} + m_SizeDelta: {x: 150, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1530543974 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1530543972} + 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: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1530543975} + 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 &1530543975 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1530543972} + 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!222 &1530543976 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1530543972} --- !u!1 &1535867278 GameObject: m_ObjectHideFlags: 0 @@ -4035,7 +4463,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Page_01 + m_Text: Page_0 --- !u!222 &1535867281 CanvasRenderer: m_ObjectHideFlags: 0 @@ -4380,7 +4808,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Page_01 + m_Text: Page_4 --- !u!222 &1735277982 CanvasRenderer: m_ObjectHideFlags: 0 @@ -4465,6 +4893,7 @@ GameObject: m_Component: - component: {fileID: 1771801965} - component: {fileID: 1771801966} + - component: {fileID: 1771801967} m_Layer: 5 m_Name: Toggle (1) m_TagString: Untagged @@ -4537,6 +4966,19 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_IsOn: 1 +--- !u!114 &1771801967 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771801964} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ea46c3573b42624aa573f2d6b091ed1, type: 3} + m_Name: + m_EditorClassIdentifier: + hss: {fileID: 67156823} + Page: 1 --- !u!1 &1790564029 GameObject: m_ObjectHideFlags: 0 @@ -4834,7 +5276,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Page_01 + m_Text: Page_1 --- !u!222 &1857291964 CanvasRenderer: m_ObjectHideFlags: 0 @@ -4993,6 +5435,7 @@ GameObject: m_Component: - component: {fileID: 2019749174} - component: {fileID: 2019749175} + - component: {fileID: 2019749176} m_Layer: 5 m_Name: Toggle (2) m_TagString: Untagged @@ -5065,6 +5508,19 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_IsOn: 1 +--- !u!114 &2019749176 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2019749173} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5ea46c3573b42624aa573f2d6b091ed1, type: 3} + m_Name: + m_EditorClassIdentifier: + hss: {fileID: 67156823} + Page: 2 --- !u!1 &2069867491 GameObject: m_ObjectHideFlags: 0 @@ -5180,7 +5636,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -5376,7 +5832,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -5450,7 +5906,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: diff --git a/Examples/HSS-VSS-ScrollSnap/UpdateScrollSnap.cs b/Examples/HSS-VSS-ScrollSnap/UpdateScrollSnap.cs index 2fc74d6..37e08dd 100644 --- a/Examples/HSS-VSS-ScrollSnap/UpdateScrollSnap.cs +++ b/Examples/HSS-VSS-ScrollSnap/UpdateScrollSnap.cs @@ -1,73 +1,80 @@ -using UnityEngine; - -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() +namespace UnityEngine.UI.Extensions.Examples +{ + public class UpdateScrollSnap : MonoBehaviour { - if (HSS) + + 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() { - var newHSSPage = GameObject.Instantiate(HorizontalPagePrefab); - HSS.AddChild(newHSSPage); + if (HSS) + { + var newHSSPage = GameObject.Instantiate(HorizontalPagePrefab); + HSS.AddChild(newHSSPage); + } + if (VSS) + { + var newVSSPage = GameObject.Instantiate(VerticalPagePrefab); + VSS.AddChild(newVSSPage); + } } - if (VSS) + + public void RemoveButton() { - var newVSSPage = GameObject.Instantiate(VerticalPagePrefab); - VSS.AddChild(newVSSPage); + 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); } } - - 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); - } -} +} \ No newline at end of file diff --git a/Examples/RadialSlider.meta b/Examples/RadialSlider.meta new file mode 100644 index 0000000..32ec864 --- /dev/null +++ b/Examples/RadialSlider.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 06c6e9a20a01e2348acb20c103a628f2 +folderAsset: yes +timeCreated: 1501105181 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/RadialSlider/UpdateRadialValue.cs b/Examples/RadialSlider/UpdateRadialValue.cs new file mode 100644 index 0000000..1d2b2d8 --- /dev/null +++ b/Examples/RadialSlider/UpdateRadialValue.cs @@ -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; + } + } +} \ No newline at end of file diff --git a/Examples/RadialSlider/UpdateRadialValue.cs.meta b/Examples/RadialSlider/UpdateRadialValue.cs.meta new file mode 100644 index 0000000..16d240b --- /dev/null +++ b/Examples/RadialSlider/UpdateRadialValue.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b5921b909b28e7f4f9a57906c667c9ce +timeCreated: 1501345599 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/RadialSlider/radial_slider.unity b/Examples/RadialSlider/radial_slider.unity new file mode 100644 index 0000000..b7a51d4 --- /dev/null +++ b/Examples/RadialSlider/radial_slider.unity @@ -0,0 +1,1841 @@ +%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: 0 + 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 &4 +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: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + 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 &5 +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 &272196201 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 272196202} + - component: {fileID: 272196204} + - component: {fileID: 272196203} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &272196202 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 272196201} + 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: 2138750732} + 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: 64, y: 32} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &272196203 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 272196201} + 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: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 18 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 +--- !u!222 &272196204 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 272196201} +--- !u!1 &272301857 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 272301862} + - component: {fileID: 272301861} + - component: {fileID: 272301860} + - component: {fileID: 272301859} + - component: {fileID: 272301858} + 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 &272301858 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 272301857} + m_Enabled: 1 +--- !u!124 &272301859 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 272301857} + m_Enabled: 1 +--- !u!92 &272301860 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 272301857} + m_Enabled: 1 +--- !u!20 &272301861 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 272301857} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.13867864, g: 0.16195394, b: 0.19852942, 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 &272301862 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 272301857} + 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} +--- !u!1 &337114568 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 337114570} + - component: {fileID: 337114569} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &337114569 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 337114568} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &337114570 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 337114568} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} + m_LocalPosition: {x: 0, y: 3, 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!1 &355489691 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 355489692} + - component: {fileID: 355489694} + - component: {fileID: 355489693} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &355489692 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 355489691} + 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: 2020971771} + 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 &355489693 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 355489691} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: Update Value +--- !u!222 &355489694 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 355489691} +--- !u!1 &752524503 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 752524507} + - component: {fileID: 752524506} + - component: {fileID: 752524505} + - component: {fileID: 752524504} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &752524504 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 752524503} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ForceModuleActive: 0 +--- !u!114 &752524505 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 752524503} + 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 &752524506 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 752524503} + 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 &752524507 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 752524503} + 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: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1070160587 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1070160590} + - component: {fileID: 1070160589} + - component: {fileID: 1070160588} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1070160588 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1070160587} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1070160589 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1070160587} +--- !u!224 &1070160590 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1070160587} + 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: 1845485014} + m_RootOrder: 1 + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1079219082 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1079219085} + - component: {fileID: 1079219084} + - component: {fileID: 1079219083} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1079219083 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1079219082} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1079219084 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1079219082} +--- !u!224 &1079219085 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1079219082} + 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: 1464375445} + m_RootOrder: 1 + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1343861603 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1343861604} + - component: {fileID: 1343861606} + - component: {fileID: 1343861605} + m_Layer: 5 + m_Name: Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1343861604 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1343861603} + 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: 1464375445} + m_RootOrder: 3 + 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: 139.5, y: 68} + m_SizeDelta: {x: 476, y: 72} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1343861605 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1343861603} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 27 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Update the Value of the Radial Slider + + Values must be between 0...1' +--- !u!222 &1343861606 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1343861603} +--- !u!1 &1428970665 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1428970668} + - component: {fileID: 1428970667} + - component: {fileID: 1428970666} + m_Layer: 5 + m_Name: ImageBackground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1428970666 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1428970665} + 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: 21300000, guid: ad716093ca8bdf84189f6a67bfb8e30e, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1428970667 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1428970665} +--- !u!224 &1428970668 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1428970665} + 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: 2138750732} + m_Father: {fileID: 1825828794} + 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: -6} + m_SizeDelta: {x: 300, y: 288} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1434512531 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1434512532} + - component: {fileID: 1434512534} + - component: {fileID: 1434512533} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1434512532 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1434512531} + 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: 1742078750} + 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 &1434512533 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1434512531} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, 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: Update Angle +--- !u!222 &1434512534 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1434512531} +--- !u!1 &1464375444 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1464375445} + - component: {fileID: 1464375448} + - component: {fileID: 1464375447} + - component: {fileID: 1464375446} + m_Layer: 5 + m_Name: Value Edit Field + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1464375445 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1464375444} + 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: 1631124201} + - {fileID: 1079219085} + - {fileID: 2020971771} + - {fileID: 1343861604} + m_Father: {fileID: 1825828794} + m_RootOrder: 1 + 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: -425, y: 162.5} + m_SizeDelta: {x: 197, y: 49} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1464375446 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1464375444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, 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: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1464375447} + m_TextComponent: {fileID: 1079219083} + m_Placeholder: {fileID: 1631124199} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &1464375447 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1464375444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, 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!222 &1464375448 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1464375444} +--- !u!1 &1631124198 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1631124201} + - component: {fileID: 1631124200} + - component: {fileID: 1631124199} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1631124199 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1631124198} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + 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: 20 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter value... +--- !u!222 &1631124200 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1631124198} +--- !u!224 &1631124201 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1631124198} + 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: 1464375445} + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1742078749 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1742078750} + - component: {fileID: 1742078754} + - component: {fileID: 1742078753} + - component: {fileID: 1742078752} + - component: {fileID: 1742078751} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1742078750 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1742078749} + 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: 1434512532} + m_Father: {fileID: 1845485014} + m_RootOrder: 2 + 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: -51} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1742078751 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1742078749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b5921b909b28e7f4f9a57906c667c9ce, type: 3} + m_Name: + m_EditorClassIdentifier: + input: {fileID: 1845485015} + slider: {fileID: 2138750735} +--- !u!114 &1742078752 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1742078749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, 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: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1742078753} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1742078751} + m_MethodName: UpdateSliderAndle + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1742078753 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1742078749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 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!222 &1742078754 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1742078749} +--- !u!1 &1754267821 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1754267824} + - component: {fileID: 1754267823} + - component: {fileID: 1754267822} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1754267822 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1754267821} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + 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: 20 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter angle... +--- !u!222 &1754267823 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1754267821} +--- !u!224 &1754267824 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1754267821} + 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: 1845485014} + 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.5} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1825828793 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1825828794} + - component: {fileID: 1825828797} + - component: {fileID: 1825828796} + - component: {fileID: 1825828795} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1825828794 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1825828793} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1428970668} + - {fileID: 1464375445} + - {fileID: 1845485014} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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!114 &1825828795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1825828793} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1825828796 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1825828793} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1280, y: 720} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0.5 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1825828797 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1825828793} + 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!1 &1845485013 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1845485014} + - component: {fileID: 1845485017} + - component: {fileID: 1845485016} + - component: {fileID: 1845485015} + m_Layer: 5 + m_Name: Angle Edit Field + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1845485014 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1845485013} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.9999897, y: 0.9999897, z: 0.9999897} + m_Children: + - {fileID: 1754267824} + - {fileID: 1070160590} + - {fileID: 1742078750} + - {fileID: 2075932593} + m_Father: {fileID: 1825828794} + m_RootOrder: 2 + 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: 497, y: 161.99994} + m_SizeDelta: {x: 192, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1845485015 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1845485013} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, 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: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1845485016} + m_TextComponent: {fileID: 1070160588} + m_Placeholder: {fileID: 1754267822} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &1845485016 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1845485013} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10911, 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!222 &1845485017 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1845485013} +--- !u!1 &2020971770 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2020971771} + - component: {fileID: 2020971775} + - component: {fileID: 2020971774} + - component: {fileID: 2020971773} + - component: {fileID: 2020971772} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2020971771 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2020971770} + 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: 355489692} + m_Father: {fileID: 1464375445} + m_RootOrder: 2 + 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: -51} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2020971772 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2020971770} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b5921b909b28e7f4f9a57906c667c9ce, type: 3} + m_Name: + m_EditorClassIdentifier: + input: {fileID: 1464375446} + slider: {fileID: 2138750735} +--- !u!114 &2020971773 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2020971770} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, 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: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2020971774} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 2020971772} + m_MethodName: UpdateSliderValue + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &2020971774 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2020971770} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 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!222 &2020971775 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2020971770} +--- !u!1 &2075932592 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2075932593} + - component: {fileID: 2075932595} + - component: {fileID: 2075932594} + m_Layer: 5 + m_Name: Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2075932593 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2075932592} + 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: 1845485014} + m_RootOrder: 3 + 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: -142, y: 67} + m_SizeDelta: {x: 476, y: 72} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2075932594 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2075932592} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 27 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 2 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Update the Angle of the Radial Slider + + Values must be between 0...360' +--- !u!222 &2075932595 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2075932592} +--- !u!1 &2138750731 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2138750732} + - component: {fileID: 2138750734} + - component: {fileID: 2138750733} + - component: {fileID: 2138750735} + m_Layer: 5 + m_Name: RadialSliderImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2138750732 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2138750731} + 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: 272196202} + m_Father: {fileID: 1428970668} + 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 &2138750733 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2138750731} + 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: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: ad716093ca8bdf84189f6a67bfb8e30e, type: 3} + m_Type: 3 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 0 + m_FillClockwise: 1 + m_FillOrigin: 3 +--- !u!222 &2138750734 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2138750731} +--- !u!114 &2138750735 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2138750731} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 803cebee00d5c504e930205383017dc1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_startColor: {r: 0, g: 1, b: 0, a: 1} + m_endColor: {r: 1, g: 0, b: 0, a: 1} + m_lerpToTarget: 0 + m_lerpCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + _onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Extensions.RadialSlider+RadialSliderValueChangedEvent, + Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + _onTextValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 272196203} + m_MethodName: set_text + m_Mode: 0 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Extensions.RadialSlider+RadialSliderTextValueChangedEvent, + Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null diff --git a/Examples/RadialSlider/radial_slider.unity.meta b/Examples/RadialSlider/radial_slider.unity.meta new file mode 100644 index 0000000..2d8e4c2 --- /dev/null +++ b/Examples/RadialSlider/radial_slider.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 84f742a1c72d4f5479bc951e9fd76fae +timeCreated: 1501350786 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/RadialSlider/radial_sprite.psd b/Examples/RadialSlider/radial_sprite.psd new file mode 100644 index 0000000..6d9aff2 Binary files /dev/null and b/Examples/RadialSlider/radial_sprite.psd differ diff --git a/Examples/RadialSlider/radial_sprite.psd.meta b/Examples/RadialSlider/radial_sprite.psd.meta new file mode 100644 index 0000000..4d75aad --- /dev/null +++ b/Examples/RadialSlider/radial_sprite.psd.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: ad716093ca8bdf84189f6a67bfb8e30e +timeCreated: 1431884735 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 8 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/SerialisationExampleScriptsAndClasses/TestClass.cs b/Examples/SerialisationExampleScriptsAndClasses/TestClass.cs index 1fef88a..c5b2d2d 100644 --- a/Examples/SerialisationExampleScriptsAndClasses/TestClass.cs +++ b/Examples/SerialisationExampleScriptsAndClasses/TestClass.cs @@ -1,13 +1,13 @@ -using UnityEngine; - -[System.Serializable] -public class TestClass { - - public string myString; - public GameObject go; - public string go_id; - public Vector3 somePosition; - public Color color; - public int[] myArray = new int[] {2,43,12}; -} - +namespace UnityEngine.UI.Extensions.Examples +{ + [System.Serializable] + public class TestClass + { + public string myString; + public GameObject go; + public string go_id; + public Vector3 somePosition; + public Color color; + public int[] myArray = new int[] { 2, 43, 12 }; + } +} \ No newline at end of file diff --git a/Examples/SerialisationExampleScriptsAndClasses/TestScript.cs b/Examples/SerialisationExampleScriptsAndClasses/TestScript.cs index 580ebbd..7034958 100644 --- a/Examples/SerialisationExampleScriptsAndClasses/TestScript.cs +++ b/Examples/SerialisationExampleScriptsAndClasses/TestScript.cs @@ -1,81 +1,98 @@ -using UnityEngine; -using UnityEngine.UI.Extensions; +namespace UnityEngine.UI.Extensions.Examples +{ + public class TestScript : MonoBehaviour + { + public string testString = "Hello"; + public GameObject someGameObject; + public string someGameObject_id; + public TestClass testClass = new TestClass(); + public TestClass[] testClassArray = new TestClass[2]; + [DontSaveField] public Transform TransformThatWontBeSaved;//The [DontSaveField] attribute we wrote ourselves prevents the field from being included in the packed component data -public class TestScript : MonoBehaviour { + public void OnSerialize() + { + //This is an example of a OnSerialize method, called before a gameobject is packed into serializable form. + //In this case, the GameObject variable "someGameObject" and those in the testClass and testclass Array instances of TestClass should be reconstructed after loading. + //Since GameObject (and Transform) references assigned during runtime can't be serialized directly, + //we keep a seperate string variable for each GO variable that holds the ID of the GO instead. + //This allows us to just save the ID instead. - public string testString = "Hello"; - public GameObject someGameObject; - public string someGameObject_id; - public TestClass testClass = new TestClass(); - public TestClass[] testClassArray = new TestClass[2]; - [DontSaveField] public Transform TransformThatWontBeSaved;//The [DontSaveField] attribute we wrote ourselves prevents the field from being included in the packed component data + //This example is one way of dealing with GameObject (and Transform) references. If a lot of those occur in your project, + //it might be more efficient to go directly into the static SaveLoad.PackComponent method. and doing it there. - public void OnSerialize() { - //This is an example of a OnSerialize method, called before a gameobject is packed into serializable form. - //In this case, the GameObject variable "someGameObject" and those in the testClass and testclass Array instances of TestClass should be reconstructed after loading. - //Since GameObject (and Transform) references assigned during runtime can't be serialized directly, - //we keep a seperate string variable for each GO variable that holds the ID of the GO instead. - //This allows us to just save the ID instead. + if (someGameObject != null && someGameObject.GetComponent()) + { + someGameObject_id = someGameObject.GetComponent().id; + } + else + { + someGameObject_id = null; + } - //This example is one way of dealing with GameObject (and Transform) references. If a lot of those occur in your project, - //it might be more efficient to go directly into the static SaveLoad.PackComponent method. and doing it there. + if (testClassArray != null) + { + foreach (TestClass testClass_cur in testClassArray) + { + if (testClass_cur.go != null && testClass_cur.go.GetComponent()) + { + testClass_cur.go_id = testClass_cur.go.GetComponent().id; + } + else + { + testClass_cur.go_id = null; + } + } - if(someGameObject != null && someGameObject.GetComponent()) { - someGameObject_id = someGameObject.GetComponent().id; - } - else { - someGameObject_id = null; - } + } + } - if(testClassArray != null) { - foreach(TestClass testClass_cur in testClassArray) { - if(testClass_cur.go != null && testClass_cur.go.GetComponent()) { - testClass_cur.go_id = testClass_cur.go.GetComponent().id; - } - else { - testClass_cur.go_id = null; - } - } + public void OnDeserialize() + { - } - } + //Since we saved the ID of the GameObject references, we can now use those to recreate the references. + //We just iterate through all the ObjectIdentifier component occurences in the scene, compare their id value to our saved and loaded someGameObject id (etc.) value, + //and assign the component's GameObject if it matches. + //Note that the "break" command is important, both because it elimitates unneccessary iterations, + //and because continuing after having found a match might for some reason find another, wrong match that makes a null reference. - public void OnDeserialize() { + ObjectIdentifier[] objectsIdentifiers = FindObjectsOfType(typeof(ObjectIdentifier)) as ObjectIdentifier[]; - //Since we saved the ID of the GameObject references, we can now use those to recreate the references. - //We just iterate through all the ObjectIdentifier component occurences in the scene, compare their id value to our saved and loaded someGameObject id (etc.) value, - //and assign the component's GameObject if it matches. - //Note that the "break" command is important, both because it elimitates unneccessary iterations, - //and because continuing after having found a match might for some reason find another, wrong match that makes a null reference. + if (string.IsNullOrEmpty(someGameObject_id) == false) + { + foreach (ObjectIdentifier objectIdentifier in objectsIdentifiers) + { - ObjectIdentifier[] objectsIdentifiers = FindObjectsOfType(typeof(ObjectIdentifier)) as ObjectIdentifier[]; - - if(string.IsNullOrEmpty(someGameObject_id) == false) { - foreach(ObjectIdentifier objectIdentifier in objectsIdentifiers) { - - if(string.IsNullOrEmpty(objectIdentifier.id) == false) { - if(objectIdentifier.id == someGameObject_id) { - someGameObject = objectIdentifier.gameObject; - break; - } - } - } - } - - if(testClassArray != null) { - foreach(TestClass testClass_cur in testClassArray) { - if(string.IsNullOrEmpty(testClass_cur.go_id) == false) { - foreach (ObjectIdentifier objectIdentifier in objectsIdentifiers) { - if(string.IsNullOrEmpty(objectIdentifier.id) == false) { - if(objectIdentifier.id == testClass_cur.go_id) { - testClass_cur.go = objectIdentifier.gameObject; - break; - } - } - } - } - } - } - } -} + if (string.IsNullOrEmpty(objectIdentifier.id) == false) + { + if (objectIdentifier.id == someGameObject_id) + { + someGameObject = objectIdentifier.gameObject; + break; + } + } + } + } + if (testClassArray != null) + { + foreach (TestClass testClass_cur in testClassArray) + { + if (string.IsNullOrEmpty(testClass_cur.go_id) == false) + { + foreach (ObjectIdentifier objectIdentifier in objectsIdentifiers) + { + if (string.IsNullOrEmpty(objectIdentifier.id) == false) + { + if (objectIdentifier.id == testClass_cur.go_id) + { + testClass_cur.go = objectIdentifier.gameObject; + break; + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Examples/TextEffects/AnimateEffects.cs b/Examples/TextEffects/AnimateEffects.cs index 58dbf00..78dee3b 100644 --- a/Examples/TextEffects/AnimateEffects.cs +++ b/Examples/TextEffects/AnimateEffects.cs @@ -1,54 +1,51 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI.Extensions; - -public class AnimateEffects : MonoBehaviour +namespace UnityEngine.UI.Extensions.Examples { - - 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() + public class AnimateEffects : MonoBehaviour { - cylinderTextRT = cylinderText.GetComponent(); + 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(); + } + + // 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; + } + + } } - - // 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; - } - - } -} +} \ No newline at end of file diff --git a/Examples/TextEffects/testHref.cs b/Examples/TextEffects/testHref.cs new file mode 100644 index 0000000..6af6eb2 --- /dev/null +++ b/Examples/TextEffects/testHref.cs @@ -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(); + } + + void OnEnable() + { + textPic.onHrefClick.AddListener(OnHrefClick); + } + + void OnDisable() + { + textPic.onHrefClick.RemoveListener(OnHrefClick); + } + + private void OnHrefClick(string hrefName) + { + Debug.Log("Click on the " + hrefName); + } + } +} \ No newline at end of file diff --git a/Examples/testHref.cs.meta b/Examples/TextEffects/testHref.cs.meta similarity index 100% rename from Examples/testHref.cs.meta rename to Examples/TextEffects/testHref.cs.meta diff --git a/Examples/UILineRenderer/LineRendererOrbit.cs b/Examples/UILineRenderer/LineRendererOrbit.cs index 9573285..57085fc 100644 --- a/Examples/UILineRenderer/LineRendererOrbit.cs +++ b/Examples/UILineRenderer/LineRendererOrbit.cs @@ -1,79 +1,78 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI.Extensions; +using System.Collections.Generic; -[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 +namespace UnityEngine.UI.Extensions.Examples +{ + [RequireComponent(typeof(UILineRenderer))] + public class LineRendererOrbit : MonoBehaviour { - get { return _xAxis; } - set { _xAxis = value; GenerateOrbit(); } - } + UILineRenderer lr; + Circle circle; + public GameObject OrbitGO; + RectTransform orbitGOrt; + float orbitTime; - [SerializeField] - private float _yAxis = 3; + [SerializeField] + private float _xAxis = 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(); - orbitGOrt = OrbitGO.GetComponent(); - 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 Points = new List(); - for (int i = 0; i < _steps; i++) + public float xAxis { - Points.Add(circle.Evaluate(i)); + get { return _xAxis; } + set { _xAxis = value; GenerateOrbit(); } } - Points.Add(circle.Evaluate(0)); - lr.Points = Points.ToArray(); - } - private void OnValidate() - { - if (lr != null) + [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(); + orbitGOrt = OrbitGO.GetComponent(); 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 Points = new List(); + 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(); + } + } } - - -} +} \ No newline at end of file diff --git a/Examples/UILineRenderer/TestAddingPoints.cs b/Examples/UILineRenderer/TestAddingPoints.cs index bdeb5fc..7bcbb6c 100644 --- a/Examples/UILineRenderer/TestAddingPoints.cs +++ b/Examples/UILineRenderer/TestAddingPoints.cs @@ -1,22 +1,25 @@ using System.Collections.Generic; -using UnityEngine; -public class TestAddingPoints : MonoBehaviour { - - public UnityEngine.UI.Extensions.UILineRenderer LineRenderer; - public UnityEngine.UI.Text XValue; - public UnityEngine.UI.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(LineRenderer.Points); - pointlist.Add(point); - LineRenderer.Points = pointlist.ToArray(); - } - - public void ClearPoints() +namespace UnityEngine.UI.Extensions.Examples +{ + public class TestAddingPoints : MonoBehaviour { - LineRenderer.Points = new Vector2[0]; + 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(LineRenderer.Points); + pointlist.Add(point); + LineRenderer.Points = pointlist.ToArray(); + } + + public void ClearPoints() + { + LineRenderer.Points = new Vector2[0]; + } } -} +} \ No newline at end of file diff --git a/Examples/UILineRenderer/UILineRendererDemo.unity b/Examples/UILineRenderer/UILineRendererDemo.unity index 577ca67..a881512 100644 --- a/Examples/UILineRenderer/UILineRendererDemo.unity +++ b/Examples/UILineRenderer/UILineRendererDemo.unity @@ -140,8 +140,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: -220, y: 1.5} - m_SizeDelta: {x: 263, y: 52} + m_AnchoredPosition: {x: -116, y: -23.5} + m_SizeDelta: {x: 361, y: 47} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &23818492 MonoBehaviour: @@ -284,9 +284,9 @@ RectTransform: m_Father: {fileID: 1754109030} m_RootOrder: 2 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: -339.5, y: -40} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 58, y: 186} m_SizeDelta: {x: 100, y: 102} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &125539413 @@ -735,9 +735,9 @@ RectTransform: m_Father: {fileID: 1754109030} m_RootOrder: 3 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: 243, y: -109} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -165, y: 112} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &651515359 @@ -777,12 +777,7 @@ MonoBehaviour: m_Sprite: {fileID: 0} m_improveResolution: 0 m_Resolution: 0 - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 + m_useNativeSize: 0 m_points: [] lineThickness: 2 relativeSize: 0 @@ -929,6 +924,7 @@ MonoBehaviour: m_Sprite: {fileID: 0} m_improveResolution: 0 m_Resolution: 0 + m_useNativeSize: 0 m_fillPercent: 100 FixedToSegments: 0 m_fill: 1 @@ -974,7 +970,7 @@ RectTransform: 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: 314, y: -148} + m_AnchoredPosition: {x: 332, y: -121} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &772182605 @@ -1083,7 +1079,7 @@ RectTransform: 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: 35.5, y: 244} + m_AnchoredPosition: {x: 184.5, y: 197} m_SizeDelta: {x: 311, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &977566256 @@ -1157,7 +1153,7 @@ RectTransform: 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: -120, y: 40} + m_AnchoredPosition: {x: 29, y: 25.5} m_SizeDelta: {x: 311, y: 189} m_Pivot: {x: 0, y: 0} --- !u!114 &1025621201 @@ -1182,12 +1178,7 @@ MonoBehaviour: m_Sprite: {fileID: 0} m_improveResolution: 0 m_Resolution: 0 - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 + m_useNativeSize: 0 m_points: - {x: 0, y: 0} - {x: 1, y: 0} @@ -1239,7 +1230,7 @@ RectTransform: 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: 309, y: -193} + m_AnchoredPosition: {x: 320, y: -169} m_SizeDelta: {x: 358, y: 44} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1032145591 @@ -1984,7 +1975,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: -178, y: 114.5} + m_AnchoredPosition: {x: -124, y: 81} m_SizeDelta: {x: 154, y: 162} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1545772328 @@ -2253,9 +2244,9 @@ RectTransform: m_Father: {fileID: 1754109030} 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_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -358, y: -224} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1625078207 @@ -2843,17 +2834,12 @@ MonoBehaviour: m_Sprite: {fileID: 0} m_improveResolution: 0 m_Resolution: 0 - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 + m_useNativeSize: 0 m_points: - - {x: -339, y: -39.5} - - {x: -266, y: -180.5} - - {x: -127, y: -67.5} - - {x: -25, y: -187.5} + - {x: -300, y: -37.5} + - {x: -227, y: -178.5} + - {x: -88, y: -65.5} + - {x: 32, y: -158.5} lineThickness: 7.41 relativeSize: 0 lineList: 0 diff --git a/Examples/UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs b/Examples/UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs index acd5d25..65b1f7e 100644 --- a/Examples/UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs +++ b/Examples/UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs @@ -5,226 +5,222 @@ /// Please donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RJ8D9FRFQF9VS /// -using UnityEngine; -using UnityEngine.UI; -using UnityEngine.UI.Extensions; - - - -public class ScrollingCalendar : MonoBehaviour - +namespace UnityEngine.UI.Extensions.Examples { - 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 = "" + arrayYears[i]; - clone.name = "Year_" + arrayYears[i]; - clone.AddComponent(); - 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 = month; - clone.name = "Month_" + months[i]; - clone.AddComponent(); - 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 = "" + days[i]; - clone.name = "Day_" + days[i]; - clone.AddComponent(); - daysButtons[i] = clone; - } - } - - // Use this for initialization - public void Awake() + public class ScrollingCalendar : MonoBehaviour { - InitializeYears(); - InitializeMonths(); - InitializeDays(); + public RectTransform monthsScrollingPanel; + public RectTransform yearsScrollingPanel; + public RectTransform daysScrollingPanel; - //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); + public GameObject yearsButtonPrefab; + public GameObject monthsButtonPrefab; + public GameObject daysButtonPrefab; - monthsVerticalScroller.Start(); - yearsVerticalScroller.Start(); - daysVerticalScroller.Start(); + 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 = "" + arrayYears[i]; + clone.name = "Year_" + arrayYears[i]; + clone.AddComponent(); + 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 = month; + clone.name = "Month_" + months[i]; + clone.AddComponent(); + 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 = "" + days[i]; + clone.name = "Day_" + days[i]; + clone.AddComponent(); + 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(); + } } - - 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(); - } -} +} \ No newline at end of file diff --git a/Examples/testHref.cs b/Examples/testHref.cs deleted file mode 100644 index 4e2e367..0000000 --- a/Examples/testHref.cs +++ /dev/null @@ -1,30 +0,0 @@ -/// Credit playemgames -/// Sourced from - http://forum.unity3d.com/threads/sprite-icons-with-text-e-g-emoticons.265927/ - -using UnityEngine; -using UnityEngine.UI.Extensions; - -public class testHref : MonoBehaviour -{ - public TextPic textPic; - - void Awake() - { - textPic = GetComponent(); - } - - void OnEnable() - { - textPic.onHrefClick.AddListener(OnHrefClick); - } - - void OnDisable() - { - textPic.onHrefClick.RemoveListener(OnHrefClick); - } - - private void OnHrefClick(string hrefName) - { - Debug.Log("Click on the " + hrefName); - } -} diff --git a/README.md b/README.md index 5f2dca4..8062ad1 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Scroll Snap (alt implementation)|Reorderable List|UI Vertical Scroller|Curved La ------|------|------|------| Best Fit Outline|Curved Text|Gradient|Gradient2|Letter Spacing NicerOutline|RaycastMask|UIFlippable|UIImageCrop|SoftAlphaMask -CylinderText|UIParticleSystem||| +CylinderText|UIParticleSystem|CurlyUI|| |||| [VR Components](https://bitbucket.org/UnityUIExtensions/unity-ui-extensions/wiki/Controls#markdown-header-vr_components)||||| diff --git a/Scripts/Controls/RadialSlider.cs b/Scripts/Controls/RadialSlider.cs new file mode 100644 index 0000000..e8b8f7b --- /dev/null +++ b/Scripts/Controls/RadialSlider.cs @@ -0,0 +1,252 @@ +/// Credit mgear, SimonDarksideJ +/// Sourced from - https://forum.unity3d.com/threads/radial-slider-circle-slider.326392/#post-3143582 +/// Updated to include lerping features and programatic access to angle/value + +using System; +using System.Collections; +using UnityEngine.Events; +using UnityEngine.EventSystems; + +namespace UnityEngine.UI.Extensions +{ + [AddComponentMenu("UI/Extensions/Radial Slider")] + [RequireComponent(typeof(Image))] + public class RadialSlider : MonoBehaviour, IPointerEnterHandler, IPointerDownHandler, IPointerUpHandler + { + private bool isPointerDown, isPointerReleased, lerpInProgress; + private Vector2 m_localPos; + private float m_targetAngle, m_lerpTargetAngle, m_startAngle, m_currentLerpTime, m_lerpTime; + private Camera m_eventCamera; + private Image m_image; + + [SerializeField] + [Tooltip("Radial Gradient Start Color")] + private Color m_startColor = Color.green; + [SerializeField] + [Tooltip("Radial Gradient End Color")] + private Color m_endColor = Color.red; + [Tooltip("Move slider absolute or use Lerping?\nDragging only supported with absolute")] + [SerializeField] + private bool m_lerpToTarget; + [Tooltip("Curve to apply to the Lerp\nMust be set to enable Lerp")] + [SerializeField] + private AnimationCurve m_lerpCurve; + [Tooltip("Event fired when value of control changes, outputs an INT angle value")] + [SerializeField] + private RadialSliderValueChangedEvent _onValueChanged = new RadialSliderValueChangedEvent(); + [Tooltip("Event fired when value of control changes, outputs a TEXT angle value")] + [SerializeField] + private RadialSliderTextValueChangedEvent _onTextValueChanged = new RadialSliderTextValueChangedEvent(); + + public float Angle + { + get { return RadialImage.fillAmount * 360f; } + set + { + if (LerpToTarget) + { + StartLerp(value / 360f); + } + else + { + UpdateRadialImage(value / 360f); + } + } + } + + public float Value + { + get { return RadialImage.fillAmount; } + set + { + if (LerpToTarget) + { + StartLerp(value); + } + else + { + UpdateRadialImage(value); + } + } + } + + public Color EndColor + { + get { return m_endColor; } + set { m_endColor = value; } + } + + public Color StartColor + { + get { return m_startColor; } + set { m_startColor = value; } + } + + public bool LerpToTarget + { + get { return m_lerpToTarget; } + set { m_lerpToTarget = value; } + } + + public AnimationCurve LerpCurve + { + get { return m_lerpCurve; } + set { m_lerpCurve = value; m_lerpTime = LerpCurve[LerpCurve.length - 1].time; } + } + + public bool LerpInProgress + { + get { return lerpInProgress; } + } + + [Serializable] + public class RadialSliderValueChangedEvent : UnityEvent { } + [Serializable] + public class RadialSliderTextValueChangedEvent : UnityEvent { } + + public Image RadialImage + { + get + { + if (m_image == null) + { + m_image = GetComponent(); + m_image.type = Image.Type.Filled; + m_image.fillMethod = Image.FillMethod.Radial360; + m_image.fillOrigin = 3; + m_image.fillAmount = 0; + } + return m_image; + } + } + + public RadialSliderValueChangedEvent onValueChanged + { + get { return _onValueChanged; } + set { _onValueChanged = value; } + } + public RadialSliderTextValueChangedEvent onTextValueChanged + { + get { return _onTextValueChanged; } + set { _onTextValueChanged = value; } + } + + private void Awake() + { + if (LerpCurve != null && LerpCurve.length > 0) + { + m_lerpTime = LerpCurve[LerpCurve.length - 1].time; + } + else + { + m_lerpTime = 1; + } + } + + private void Update() + { + if (isPointerDown) + { + m_targetAngle = GetAngleFromMousePoint(); + if (!lerpInProgress) + { + if (!LerpToTarget) + { + UpdateRadialImage(m_targetAngle); + + NotifyValueChanged(); + } + else + { + if (isPointerReleased) StartLerp(m_targetAngle); + isPointerReleased = false; + } + } + } + if (lerpInProgress && Value != m_lerpTargetAngle) + { + m_currentLerpTime += Time.deltaTime; + float perc = m_currentLerpTime / m_lerpTime; + if (LerpCurve != null && LerpCurve.length > 0) + { + UpdateRadialImage(Mathf.Lerp(m_startAngle, m_lerpTargetAngle, LerpCurve.Evaluate(perc))); + } + else + { + UpdateRadialImage(Mathf.Lerp(m_startAngle, m_lerpTargetAngle, perc)); + } + } + if (m_currentLerpTime >= m_lerpTime || Value == m_lerpTargetAngle) + { + lerpInProgress = false; + UpdateRadialImage(m_lerpTargetAngle); + NotifyValueChanged(); + } + } + + private void StartLerp(float targetAngle) + { + if (!lerpInProgress) + { + m_startAngle = Value; + m_lerpTargetAngle = targetAngle; + m_currentLerpTime = 0f; + lerpInProgress = true; + } + } + + private float GetAngleFromMousePoint() + { + RectTransformUtility.ScreenPointToLocalPointInRectangle(transform as RectTransform, Input.mousePosition, m_eventCamera, out m_localPos); + + // radial pos of the mouse position. + return (Mathf.Atan2(-m_localPos.y, m_localPos.x) * 180f / Mathf.PI + 180f) / 360f; + } + + private void UpdateRadialImage(float targetAngle) + { + RadialImage.fillAmount = targetAngle; + + RadialImage.color = Color.Lerp(m_startColor, m_endColor, targetAngle); + } + + private void NotifyValueChanged() + { + _onValueChanged.Invoke((int)(m_targetAngle * 360f)); + _onTextValueChanged.Invoke(((int)(m_targetAngle * 360f)).ToString()); + } + +//#if UNITY_EDITOR + +// private void OnValidate() +// { +// if (LerpToTarget && LerpCurve.length < 2) +// { +// LerpToTarget = false; +// Debug.LogError("You need to define a Lerp Curve to enable 'Lerp To Target'"); +// } +// } +//#endif + + #region Interfaces + // Called when the pointer enters our GUI component. + // Start tracking the mouse + public void OnPointerEnter(PointerEventData eventData) + { + m_eventCamera = eventData.enterEventCamera; + } + + public void OnPointerDown(PointerEventData eventData) + { + m_eventCamera = eventData.enterEventCamera; + isPointerDown = true; + } + + public void OnPointerUp(PointerEventData eventData) + { + isPointerDown = false; + isPointerReleased = true; + } + #endregion + } +} \ No newline at end of file diff --git a/Scripts/Controls/RadialSlider.cs.meta b/Scripts/Controls/RadialSlider.cs.meta new file mode 100644 index 0000000..4c33e20 --- /dev/null +++ b/Scripts/Controls/RadialSlider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 803cebee00d5c504e930205383017dc1 +timeCreated: 1432062988 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Examples/SelectionBox/ExampleSelectable.cs b/Scripts/Controls/SelectionBox/ExampleSelectable.cs similarity index 99% rename from Examples/SelectionBox/ExampleSelectable.cs rename to Scripts/Controls/SelectionBox/ExampleSelectable.cs index a651064..26eb952 100644 --- a/Examples/SelectionBox/ExampleSelectable.cs +++ b/Scripts/Controls/SelectionBox/ExampleSelectable.cs @@ -3,12 +3,10 @@ /// Updated Credit BenZed /// Sourced from - http://forum.unity3d.com/threads/color-picker.267043/ - namespace UnityEngine.UI.Extensions { public class ExampleSelectable : MonoBehaviour, IBoxSelectable { - #region Implemented members of IBoxSelectable bool _selected = false; public bool selected diff --git a/Examples/SelectionBox/ExampleSelectable.cs.meta b/Scripts/Controls/SelectionBox/ExampleSelectable.cs.meta similarity index 100% rename from Examples/SelectionBox/ExampleSelectable.cs.meta rename to Scripts/Controls/SelectionBox/ExampleSelectable.cs.meta diff --git a/Scripts/Effects/CurlyUI.meta b/Scripts/Effects/CurlyUI.meta new file mode 100644 index 0000000..8045d0a --- /dev/null +++ b/Scripts/Effects/CurlyUI.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e8f8c7784bd14f146a01bb324949f7cb +folderAsset: yes +timeCreated: 1501406849 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Effects/CurlyUI/CUIBezierCurve.cs b/Scripts/Effects/CurlyUI/CUIBezierCurve.cs new file mode 100644 index 0000000..302ded6 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIBezierCurve.cs @@ -0,0 +1,116 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +namespace UnityEngine.UI.Extensions +{ + /// + /// Assume to be a cubic bezier curve at the moment. + /// + public class CUIBezierCurve : MonoBehaviour + { + public readonly static int CubicBezierCurvePtNum = 4; + + #region Descriptions + + [SerializeField] + protected Vector3[] controlPoints; + + public Vector3[] ControlPoints + { + get + { + return controlPoints; + } + + } + +#if UNITY_EDITOR + /// + /// Reserve for editor only + /// + public Vector3[] EDITOR_ControlPoints + { + set + { + controlPoints = value; + } + } +#endif + + #endregion + + #region Events + +#if UNITY_EDITOR + protected void OnValidate() + { + Refresh(); + } +#endif + + public void Refresh() + { + + if (OnRefresh != null) + OnRefresh(); + } + + #endregion + #region Services + + /// + /// call this to get a sample + /// + /// + /// sample returned by said time + public Vector3 GetPoint(float _time) + { + float oneMinusTime = 1 - _time; + + return oneMinusTime * oneMinusTime * oneMinusTime * controlPoints[0] + + 3 * oneMinusTime * oneMinusTime * _time * controlPoints[1] + + 3 * oneMinusTime * _time * _time * controlPoints[2] + + _time * _time * _time * controlPoints[3]; + } + + public Vector3 GetTangent(float _time) + { + float oneMinusTime = 1 - _time; + + return 3 * oneMinusTime * oneMinusTime * (controlPoints[1] - controlPoints[0]) + + 6 * oneMinusTime * _time * (controlPoints[2] - controlPoints[1]) + + 3 * _time * _time * (controlPoints[3] - controlPoints[2]); + } + + #endregion + + #region Configurations + + public void ReportSet() + { + if (controlPoints == null) + { + controlPoints = new Vector3[CUIBezierCurve.CubicBezierCurvePtNum]; + controlPoints[0] = new Vector3(0, 0, 0); + controlPoints[1] = new Vector3(0, 1, 0); + controlPoints[2] = new Vector3(1, 1, 0); + controlPoints[3] = new Vector3(1, 0, 0); + } + + bool isPointsReady = true; + + isPointsReady = isPointsReady & controlPoints.Length == CUIBezierCurve.CubicBezierCurvePtNum; + } + #endregion + + + #region Services + + public System.Action OnRefresh; + + + + #endregion + + } +} \ No newline at end of file diff --git a/Scripts/Effects/CurlyUI/CUIBezierCurve.cs.meta b/Scripts/Effects/CurlyUI/CUIBezierCurve.cs.meta new file mode 100644 index 0000000..1d67104 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIBezierCurve.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 983a3e151cd916d4faf111dc86266574 +timeCreated: 1485671878 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Effects/CurlyUI/CUIGraphic.cs b/Scripts/Effects/CurlyUI/CUIGraphic.cs new file mode 100644 index 0000000..c324301 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIGraphic.cs @@ -0,0 +1,617 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +using System.Collections.Generic; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace UnityEngine.UI.Extensions +{ + [RequireComponent(typeof(RectTransform))] + [RequireComponent(typeof(Graphic))] + [DisallowMultipleComponent] + [AddComponentMenu("UI/Effects/Extensions/Curly UI Graphic")] + public class CUIGraphic : BaseMeshEffect + { + // Describing the properties that are shared by all objects of this class + #region Nature + + readonly public static int bottomCurveIdx = 0; + readonly public static int topCurveIdx = 1; + + #endregion + + /// + /// Describing the properties of this object. + /// + #region Description + + [Tooltip("Set true to make the curve/morph to work. Set false to quickly see the original UI.")] + [SerializeField] + protected bool isCurved = true; + public bool IsCurved + { + get + { + return isCurved; + } + } + + [Tooltip("Set true to dynamically change the curve according to the dynamic change of the UI layout")] + [SerializeField] + protected bool isLockWithRatio = true; + public bool IsLockWithRatio + { + get + { + return isLockWithRatio; + } + } + + [Tooltip("Pick a higher resolution to improve the quality of the curved graphic.")] + [SerializeField] + [Range(0.01f, 30.0f)] + protected float resolution = 5.0f; + + #endregion + + /// + /// Refernce to other objects that are needed by this object. + /// + #region Links + + protected RectTransform rectTrans; + public RectTransform RectTrans + { + get + { + return rectTrans; + } + } + + [Tooltip("Put in the Graphic you want to curve/morph here.")] + [SerializeField] + protected Graphic uiGraphic; + public Graphic UIGraphic + { + get + { + return uiGraphic; + } + } + [Tooltip("Put in the reference Graphic that will be used to tune the bezier curves. Think button image and text.")] + [SerializeField] + protected CUIGraphic refCUIGraphic; + public CUIGraphic RefCUIGraphic + { + get + { + return refCUIGraphic; + } + } + + [Tooltip("Do not touch this unless you are sure what you are doing. The curves are (re)generated automatically.")] + [SerializeField] + protected CUIBezierCurve[] refCurves; + public CUIBezierCurve[] RefCurves + { + get + { + return refCurves; + } + } + + [HideInInspector] + [SerializeField] + protected Vector3_Array2D[] refCurvesControlRatioPoints; + public Vector3_Array2D[] RefCurvesControlRatioPoints + { + get + { + return refCurvesControlRatioPoints; + } + } + +#if UNITY_EDITOR + + public CUIBezierCurve[] EDITOR_RefCurves + { + set + { + refCurves = value; + } + } + + public Vector3_Array2D[] EDITOR_RefCurvesControlRatioPoints + { + set + { + refCurvesControlRatioPoints = value; + } + } + +#endif + + #endregion + + // Methods that are used often. + #region Reuse + + protected List reuse_quads = new List(); + + #endregion + + #region Action + + protected void solveDoubleEquationWithVector(float _x_1, float _y_1, float _x_2, float _y_2, Vector3 _constant_1, Vector3 _contant_2, out Vector3 _x, out Vector3 _y) + { + Vector3 f; + float g; + + if (Mathf.Abs(_x_1) > Mathf.Abs(_x_2)) + { + f = _constant_1 * _x_2 / _x_1; + g = _y_1 * _x_2 / _x_1; + _y = (_contant_2 - f) / (_y_2 - g); + if (_x_2 != 0) + _x = (f - g * _y) / _x_2; + else + _x = (_constant_1 - _y_1 * _y) / _x_1; + } + else + { + f = _contant_2 * _x_1 / _x_2; + g = _y_2 * _x_1 / _x_2; + _x = (_constant_1 - f) / (_y_1 - g); + if (_x_1 != 0) + _y = (f - g * _x) / _x_1; + else + _y = (_contant_2 - _y_2 * _x) / _x_2; + } + } + + + protected UIVertex uiVertexLerp(UIVertex _a, UIVertex _b, float _time) + { + UIVertex tmpUIVertex = new UIVertex(); + + tmpUIVertex.position = Vector3.Lerp(_a.position, _b.position, _time); + tmpUIVertex.normal = Vector3.Lerp(_a.normal, _b.normal, _time); + tmpUIVertex.tangent = Vector3.Lerp(_a.tangent, _b.tangent, _time); + tmpUIVertex.uv0 = Vector2.Lerp(_a.uv0, _b.uv0, _time); + tmpUIVertex.uv1 = Vector2.Lerp(_a.uv1, _b.uv1, _time); + tmpUIVertex.color = Color.Lerp(_a.color, _b.color, _time); + + return tmpUIVertex; + } + + /// + /// Bilinear Interpolation + /// + protected UIVertex uiVertexBerp(UIVertex v_bottomLeft, UIVertex v_topLeft, UIVertex v_topRight, UIVertex v_bottomRight, float _xTime, float _yTime) + { + UIVertex topX = uiVertexLerp(v_topLeft, v_topRight, _xTime); + UIVertex bottomX = uiVertexLerp(v_bottomLeft, v_bottomRight, _xTime); + return uiVertexLerp(bottomX, topX, _yTime); + } + + protected void tessellateQuad(List _quads, int _thisQuadIdx) + { + UIVertex v_bottomLeft = _quads[_thisQuadIdx]; + UIVertex v_topLeft = _quads[_thisQuadIdx + 1]; + UIVertex v_topRight = _quads[_thisQuadIdx + 2]; + UIVertex v_bottomRight = _quads[_thisQuadIdx + 3]; + + float quadSize = 100.0f / resolution; + + int heightQuadEdgeNum = Mathf.Max(1, Mathf.CeilToInt((v_topLeft.position - v_bottomLeft.position).magnitude / quadSize)); + int widthQuadEdgeNum = Mathf.Max(1, Mathf.CeilToInt((v_topRight.position - v_topLeft.position).magnitude / quadSize)); + + int quadIdx = 0; + + for (int x = 0; x < widthQuadEdgeNum; x++) + { + for (int y = 0; y < heightQuadEdgeNum; y++, quadIdx++) + { + _quads.Add(new UIVertex()); + _quads.Add(new UIVertex()); + _quads.Add(new UIVertex()); + _quads.Add(new UIVertex()); + + float xRatio = (float)x / widthQuadEdgeNum; + float yRatio = (float)y / heightQuadEdgeNum; + float xPlusOneRatio = (float)(x + 1) / widthQuadEdgeNum; + float yPlusOneRatio = (float)(y + 1) / heightQuadEdgeNum; + + _quads[_quads.Count - 4] = uiVertexBerp(v_bottomLeft, v_topLeft, v_topRight, v_bottomRight, xRatio, yRatio); + _quads[_quads.Count - 3] = uiVertexBerp(v_bottomLeft, v_topLeft, v_topRight, v_bottomRight, xRatio, yPlusOneRatio); + _quads[_quads.Count - 2] = uiVertexBerp(v_bottomLeft, v_topLeft, v_topRight, v_bottomRight, xPlusOneRatio, yPlusOneRatio); + _quads[_quads.Count - 1] = uiVertexBerp(v_bottomLeft, v_topLeft, v_topRight, v_bottomRight, xPlusOneRatio, yRatio); + + } + } + } + + protected void tessellateGraphic(List _verts) + { + for (int v = 0; v < _verts.Count; v += 6) + { + reuse_quads.Add(_verts[v]); // bottom left + reuse_quads.Add(_verts[v + 1]); // top left + reuse_quads.Add(_verts[v + 2]); // top right + // verts[3] is redundant, top right + reuse_quads.Add(_verts[v + 4]); // bottom right + // verts[5] is redundant, bottom left + } + + int oriQuadNum = reuse_quads.Count / 4; + for (int q = 0; q < oriQuadNum; q++) + { + tessellateQuad(reuse_quads, q * 4); + } + + // remove original quads + reuse_quads.RemoveRange(0, oriQuadNum * 4); + + _verts.Clear(); + + // process new quads and turn them into triangles + for (int q = 0; q < reuse_quads.Count; q += 4) + { + _verts.Add(reuse_quads[q]); + _verts.Add(reuse_quads[q + 1]); + _verts.Add(reuse_quads[q + 2]); + _verts.Add(reuse_quads[q + 2]); + _verts.Add(reuse_quads[q + 3]); + _verts.Add(reuse_quads[q]); + } + + reuse_quads.Clear(); + } + + #endregion + + // Events are for handling reoccuring function calls that react to the changes of the environment. + #region Events + + protected override void OnRectTransformDimensionsChange() + { + if (isLockWithRatio) + { + UpdateCurveControlPointPositions(); + } + } + + public void Refresh() + { + ReportSet(); + + // we use local position as the true value. Ratio position follows it, so it should be updated when refresh + + for (int c = 0; c < refCurves.Length; c++) + { + + CUIBezierCurve curve = refCurves[c]; + + if (curve.ControlPoints != null) + { + + Vector3[] controlPoints = curve.ControlPoints; + + for (int p = 0; p < CUIBezierCurve.CubicBezierCurvePtNum; p++) + { + +#if UNITY_EDITOR + Undo.RecordObject(this, "Move Point"); +#endif + + Vector3 ratioPoint = controlPoints[p]; + + ratioPoint.x = (ratioPoint.x + rectTrans.rect.width * rectTrans.pivot.x) / rectTrans.rect.width; + ratioPoint.y = (ratioPoint.y + rectTrans.rect.height * rectTrans.pivot.y) / rectTrans.rect.height; + + refCurvesControlRatioPoints[c][p] = ratioPoint; + } + } + } + + //uiText.SetAllDirty(); + // need this to refresh the UI text, SetAllDirty does not seem to work for all cases + if (uiGraphic != null) + { + uiGraphic.enabled = false; + uiGraphic.enabled = true; + } + } + + #endregion + + // Methods that change the behaviour of the object. + #region Flash-Phase + + protected override void Awake() + { + base.Awake(); + OnRectTransformDimensionsChange(); + + } + protected override void OnEnable() + { + base.OnEnable(); + OnRectTransformDimensionsChange(); + + } + + #endregion + + #region Configurations + + /// + /// Check, prepare and set everything needed. + /// + public virtual void ReportSet() + { + + if (rectTrans == null) + rectTrans = GetComponent(); + + if (refCurves == null) + refCurves = new CUIBezierCurve[2]; + + bool isCurvesReady = true; + + for (int c = 0; c < 2; c++) + { + isCurvesReady = isCurvesReady & refCurves[c] != null; + } + + isCurvesReady = isCurvesReady & refCurves.Length == 2; + + if (!isCurvesReady) + { + CUIBezierCurve[] curves = refCurves; + + for (int c = 0; c < 2; c++) + { + if (refCurves[c] == null) + { + GameObject go = new GameObject(); + go.transform.SetParent(transform); + go.transform.localPosition = Vector3.zero; + go.transform.localEulerAngles = Vector3.zero; + + if (c == 0) + { + go.name = "BottomRefCurve"; + } + else + { + go.name = "TopRefCurve"; + } + + curves[c] = go.AddComponent(); + + } + else + { + curves[c] = refCurves[c]; + } + curves[c].ReportSet(); + } + + refCurves = curves; + } + + if (refCurvesControlRatioPoints == null) + { + refCurvesControlRatioPoints = new Vector3_Array2D[refCurves.Length]; + + for (int c = 0; c < refCurves.Length; c++) + { + { + refCurvesControlRatioPoints[c].array = new Vector3[refCurves[c].ControlPoints.Length]; + } + } + + FixTextToRectTrans(); + Refresh(); + } + + for (int c = 0; c < 2; c++) + { + refCurves[c].OnRefresh = Refresh; + } + } + + public void FixTextToRectTrans() + { + for (int c = 0; c < refCurves.Length; c++) + { + CUIBezierCurve curve = refCurves[c]; + + for (int p = 0; p < CUIBezierCurve.CubicBezierCurvePtNum; p++) + { + if (curve.ControlPoints != null) + { + Vector3[] controlPoints = curve.ControlPoints; + + if (c == 0) + { + controlPoints[p].y = -rectTrans.rect.height * rectTrans.pivot.y; + } + else + { + controlPoints[p].y = rectTrans.rect.height - rectTrans.rect.height * rectTrans.pivot.y; + } + + controlPoints[p].x = rectTrans.rect.width * p / (CUIBezierCurve.CubicBezierCurvePtNum - 1); + controlPoints[p].x -= rectTrans.rect.width * rectTrans.pivot.x; + + controlPoints[p].z = 0; + } + } + } + } + + public void ReferenceCUIForBCurves() + { + // compute the position ratio of this rect transform in perspective of reference rect transform + + Vector3 posDeltaBetweenBottomLeftCorner = rectTrans.localPosition;// Difference between pivot + + posDeltaBetweenBottomLeftCorner.x += -rectTrans.rect.width * rectTrans.pivot.x + (refCUIGraphic.rectTrans.rect.width * refCUIGraphic.rectTrans.pivot.x); + posDeltaBetweenBottomLeftCorner.y += -rectTrans.rect.height * rectTrans.pivot.y + (refCUIGraphic.rectTrans.rect.height * refCUIGraphic.rectTrans.pivot.y); + //posDeltaBetweenBottomLeftCorner.z = rectTrans.localPosition.z; + + Vector3 bottomLeftPosRatio = new Vector3(posDeltaBetweenBottomLeftCorner.x / refCUIGraphic.RectTrans.rect.width, posDeltaBetweenBottomLeftCorner.y / refCUIGraphic.RectTrans.rect.height, posDeltaBetweenBottomLeftCorner.z); + Vector3 topRightPosRatio = new Vector3((posDeltaBetweenBottomLeftCorner.x + rectTrans.rect.width) / refCUIGraphic.RectTrans.rect.width, (posDeltaBetweenBottomLeftCorner.y + rectTrans.rect.height) / refCUIGraphic.RectTrans.rect.height, posDeltaBetweenBottomLeftCorner.z); + + refCurves[0].ControlPoints[0] = refCUIGraphic.GetBCurveSandwichSpacePoint(bottomLeftPosRatio.x, bottomLeftPosRatio.y) - rectTrans.localPosition; + refCurves[0].ControlPoints[3] = refCUIGraphic.GetBCurveSandwichSpacePoint(topRightPosRatio.x, bottomLeftPosRatio.y) - rectTrans.localPosition; + + refCurves[1].ControlPoints[0] = refCUIGraphic.GetBCurveSandwichSpacePoint(bottomLeftPosRatio.x, topRightPosRatio.y) - rectTrans.localPosition; + refCurves[1].ControlPoints[3] = refCUIGraphic.GetBCurveSandwichSpacePoint(topRightPosRatio.x, topRightPosRatio.y) - rectTrans.localPosition; + + // use two sample points from the reference curves to find the second and third controls points for this curves + for (int c = 0; c < refCurves.Length; c++) + { + CUIBezierCurve curve = refCurves[c]; + + float yTime = c == 0 ? bottomLeftPosRatio.y : topRightPosRatio.y; + + Vector3 leftPoint = refCUIGraphic.GetBCurveSandwichSpacePoint(bottomLeftPosRatio.x, yTime); + Vector3 rightPoint = refCUIGraphic.GetBCurveSandwichSpacePoint(topRightPosRatio.x, yTime); + + float quarter = 0.25f, + threeQuarter = 0.75f; + + Vector3 quarterPoint = refCUIGraphic.GetBCurveSandwichSpacePoint((bottomLeftPosRatio.x * 0.75f + topRightPosRatio.x * 0.25f) / 1.0f, yTime); + Vector3 threeQuaterPoint = refCUIGraphic.GetBCurveSandwichSpacePoint((bottomLeftPosRatio.x * 0.25f + topRightPosRatio.x * 0.75f) / 1.0f, yTime); + + float x_1 = 3 * threeQuarter * threeQuarter * quarter, // (1 - t)(1 - t)t + y_1 = 3 * threeQuarter * quarter * quarter, + x_2 = 3 * quarter * quarter * threeQuarter, + y_2 = 3 * quarter * threeQuarter * threeQuarter; + + Vector3 contant_1 = quarterPoint - Mathf.Pow(threeQuarter, 3) * leftPoint - Mathf.Pow(quarter, 3) * rightPoint, + contant_2 = threeQuaterPoint - Mathf.Pow(quarter, 3) * leftPoint - Mathf.Pow(threeQuarter, 3) * rightPoint, + p1, + p2; + + solveDoubleEquationWithVector(x_1, y_1, x_2, y_2, contant_1, contant_2, out p1, out p2); + + curve.ControlPoints[1] = p1 - rectTrans.localPosition; + curve.ControlPoints[2] = p2 - rectTrans.localPosition; + + } + // use tangent and start and end time to derive control point 2 and 3 + } + + public override void ModifyMesh(Mesh _mesh) + { + + if (!IsActive()) + return; + + using (VertexHelper vh = new VertexHelper(_mesh)) + { + ModifyMesh(vh); + vh.FillMesh(_mesh); + } + + } + + public override void ModifyMesh(VertexHelper _vh) + { + + if (!IsActive()) + return; + + List vertexList = new List(); + _vh.GetUIVertexStream(vertexList); + + modifyVertices(vertexList); + + _vh.Clear(); + _vh.AddUIVertexTriangleStream(vertexList); + } + + protected virtual void modifyVertices(List _verts) + { + if (!IsActive()) + return; + + tessellateGraphic(_verts); + + if (!isCurved) + { + return; + } + + for (int index = 0; index < _verts.Count; index++) + { + var uiVertex = _verts[index]; + + // finding the horizontal ratio position (0.0 - 1.0) of a vertex + float horRatio = (uiVertex.position.x + rectTrans.rect.width * rectTrans.pivot.x) / rectTrans.rect.width; + float verRatio = (uiVertex.position.y + rectTrans.rect.height * rectTrans.pivot.y) / rectTrans.rect.height; + + //Vector3 pos = Vector3.Lerp(refCurves[0].GetPoint(horRatio), refCurves[1].GetPoint(horRatio), verRatio); + Vector3 pos = GetBCurveSandwichSpacePoint(horRatio, verRatio); + + uiVertex.position.x = pos.x; + uiVertex.position.y = pos.y; + uiVertex.position.z = pos.z; + + _verts[index] = uiVertex; + } + } + + public void UpdateCurveControlPointPositions() + { + ReportSet(); + + for (int c = 0; c < refCurves.Length; c++) + { + CUIBezierCurve curve = refCurves[c]; + +#if UNITY_EDITOR + Undo.RecordObject(curve, "Move Rect"); +#endif + + for (int p = 0; p < refCurves[c].ControlPoints.Length; p++) + { + + Vector3 newPt = refCurvesControlRatioPoints[c][p]; + + newPt.x = newPt.x * rectTrans.rect.width - rectTrans.rect.width * rectTrans.pivot.x; + newPt.y = newPt.y * rectTrans.rect.height - rectTrans.rect.height * rectTrans.pivot.y; + + curve.ControlPoints[p] = newPt; + + } + } + } + + #endregion + + // Methods that serves other objects + #region Services + + public Vector3 GetBCurveSandwichSpacePoint(float _xTime, float _yTime) + { + //return Vector3.Lerp(refCurves[0].GetPoint(_xTime), refCurves[1].GetPoint(_xTime), _yTime); + return refCurves[0].GetPoint(_xTime) * (1 - _yTime) + refCurves[1].GetPoint(_xTime) * _yTime; // use a custom made lerp so that the value is not clamped between 0 and 1 + } + + public Vector3 GetBCurveSandwichSpaceTangent(float _xTime, float _yTime) + { + return refCurves[0].GetTangent(_xTime) * (1 - _yTime) + refCurves[1].GetTangent(_xTime) * _yTime; + } + + #endregion + + } +} \ No newline at end of file diff --git a/Scripts/Effects/CurlyUI/CUIGraphic.cs.meta b/Scripts/Effects/CurlyUI/CUIGraphic.cs.meta new file mode 100644 index 0000000..f449ea8 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIGraphic.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e011f2cb554f96547bbfc22e5f001c17 +timeCreated: 1485600090 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Effects/CurlyUI/CUIImage.cs b/Scripts/Effects/CurlyUI/CUIImage.cs new file mode 100644 index 0000000..6506544 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIImage.cs @@ -0,0 +1,165 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +using System.Collections.Generic; + +namespace UnityEngine.UI.Extensions +{ + [RequireComponent(typeof(RectTransform))] + [RequireComponent(typeof(Image))] + [AddComponentMenu("UI/Effects/Extensions/Curly UI Image")] + public class CUIImage : CUIGraphic + { + #region Nature + + public static int SlicedImageCornerRefVertexIdx = 2; + public static int FilledImageCornerRefVertexIdx = 0; + + /// + /// For sliced and filled image only. + /// + /// + /// + public static int ImageTypeCornerRefVertexIdx(Image.Type _type) + { + if (_type == Image.Type.Sliced) + { + return SlicedImageCornerRefVertexIdx; + } + else + { + return FilledImageCornerRefVertexIdx; + } + } + #endregion + + #region Description + + [Tooltip("For changing the size of the corner for tiled or sliced Image")] + [HideInInspector] + [SerializeField] + public Vector2 cornerPosRatio = Vector2.one * -1; // -1 means unset value + + [HideInInspector] + [SerializeField] + protected Vector2 oriCornerPosRatio = Vector2.one * -1; + public Vector2 OriCornerPosRatio + { + get + { + return oriCornerPosRatio; + } + } + + #endregion + + public Image UIImage + { + get + { + return (Image)uiGraphic; + } + } + + #region Configurations + + public override void ReportSet() + { + + if (uiGraphic == null) + uiGraphic = GetComponent(); + + base.ReportSet(); + } + + protected override void modifyVertices(List _verts) + { + if (!IsActive()) + return; + + if (UIImage.type == Image.Type.Filled) + { + Debug.LogWarning("Might not work well Radial Filled at the moment!"); + + } + else if (UIImage.type == Image.Type.Sliced || UIImage.type == Image.Type.Tiled) + { + // setting the starting cornerRatio + if (cornerPosRatio == Vector2.one * -1) + { + cornerPosRatio = _verts[ImageTypeCornerRefVertexIdx(UIImage.type)].position; + cornerPosRatio.x = (cornerPosRatio.x + rectTrans.pivot.x * rectTrans.rect.width) / rectTrans.rect.width; + cornerPosRatio.y = (cornerPosRatio.y + rectTrans.pivot.y * rectTrans.rect.height) / rectTrans.rect.height; + + oriCornerPosRatio = cornerPosRatio; + + } + + // constraing the corner ratio + if (cornerPosRatio.x < 0) + { + cornerPosRatio.x = 0; + } + if (cornerPosRatio.x >= 0.5f) + { + cornerPosRatio.x = 0.5f; + } + if (cornerPosRatio.y < 0) + { + cornerPosRatio.y = 0; + } + if (cornerPosRatio.y >= 0.5f) + { + cornerPosRatio.y = 0.5f; + } + + for (int index = 0; index < _verts.Count; index++) + { + var uiVertex = _verts[index]; + + // finding the horizontal ratio position (0.0 - 1.0) of a vertex + float horRatio = (uiVertex.position.x + rectTrans.rect.width * rectTrans.pivot.x) / rectTrans.rect.width; + float verRatio = (uiVertex.position.y + rectTrans.rect.height * rectTrans.pivot.y) / rectTrans.rect.height; + + if (horRatio < oriCornerPosRatio.x) + { + horRatio = Mathf.Lerp(0, cornerPosRatio.x, horRatio / oriCornerPosRatio.x); + } + else if (horRatio > 1 - oriCornerPosRatio.x) + { + horRatio = Mathf.Lerp(1 - cornerPosRatio.x, 1, (horRatio - (1 - oriCornerPosRatio.x)) / oriCornerPosRatio.x); + } + else + { + horRatio = Mathf.Lerp(cornerPosRatio.x, 1 - cornerPosRatio.x, (horRatio - oriCornerPosRatio.x) / (1 - oriCornerPosRatio.x * 2)); + } + + if (verRatio < oriCornerPosRatio.y) + { + verRatio = Mathf.Lerp(0, cornerPosRatio.y, verRatio / oriCornerPosRatio.y); + } + else if (verRatio > 1 - oriCornerPosRatio.y) + { + verRatio = Mathf.Lerp(1 - cornerPosRatio.y, 1, (verRatio - (1 - oriCornerPosRatio.y)) / oriCornerPosRatio.y); + } + else + { + verRatio = Mathf.Lerp(cornerPosRatio.y, 1 - cornerPosRatio.y, (verRatio - oriCornerPosRatio.y) / (1 - oriCornerPosRatio.y * 2)); + } + + uiVertex.position.x = horRatio * rectTrans.rect.width - rectTrans.rect.width * rectTrans.pivot.x; + uiVertex.position.y = verRatio * rectTrans.rect.height - rectTrans.rect.height * rectTrans.pivot.y; + //uiVertex.position.z = pos.z; + + _verts[index] = uiVertex; + } + } + + base.modifyVertices(_verts); + + } + + #endregion + + } +} \ No newline at end of file diff --git a/Scripts/Effects/CurlyUI/CUIImage.cs.meta b/Scripts/Effects/CurlyUI/CUIImage.cs.meta new file mode 100644 index 0000000..ae724d3 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIImage.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9ab7726a352b5004cbf5f8e153868637 +timeCreated: 1485600090 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Effects/CurlyUI/CUIMisc.cs b/Scripts/Effects/CurlyUI/CUIMisc.cs new file mode 100644 index 0000000..2335e87 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIMisc.cs @@ -0,0 +1,24 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +namespace UnityEngine.UI.Extensions +{ + [System.Serializable] + public struct Vector3_Array2D + { + [SerializeField] + public Vector3[] array; + + public Vector3 this[int _idx] + { + get + { + return array[_idx]; + } + set + { + array[_idx] = value; + } + } + } +} \ No newline at end of file diff --git a/Scripts/Effects/CurlyUI/CUIMisc.cs.meta b/Scripts/Effects/CurlyUI/CUIMisc.cs.meta new file mode 100644 index 0000000..17a17db --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIMisc.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2e82bd2b2afc435438d5d8d7d3459dd0 +timeCreated: 1485704814 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Effects/CurlyUI/CUIText.cs b/Scripts/Effects/CurlyUI/CUIText.cs new file mode 100644 index 0000000..fa06906 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIText.cs @@ -0,0 +1,19 @@ +/// Credit Titinious (https://github.com/Titinious) +/// Sourced from - https://github.com/Titinious/CurlyUI + +namespace UnityEngine.UI.Extensions +{ + [RequireComponent(typeof(RectTransform))] + [RequireComponent(typeof(Text))] + [AddComponentMenu("UI/Effects/Extensions/Curly UI Text")] + public class CUIText : CUIGraphic + { + public override void ReportSet() + { + if (uiGraphic == null) + uiGraphic = GetComponent(); + + base.ReportSet(); + } + } +} \ No newline at end of file diff --git a/Scripts/Effects/CurlyUI/CUIText.cs.meta b/Scripts/Effects/CurlyUI/CUIText.cs.meta new file mode 100644 index 0000000..14ab683 --- /dev/null +++ b/Scripts/Effects/CurlyUI/CUIText.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 64c40f35eca5d5d4da4eefac2a627005 +timeCreated: 1485600090 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Layout/FancyScrollView.cs b/Scripts/Layout/FancyScrollView.cs new file mode 100644 index 0000000..fd062a8 --- /dev/null +++ b/Scripts/Layout/FancyScrollView.cs @@ -0,0 +1,208 @@ +/// Credit setchi (https://github.com/setchi) +/// Sourced from - https://github.com/setchi/FancyScrollView + +using System.Collections.Generic; + +namespace UnityEngine.UI.Extensions +{ + public class FancyScrollView : MonoBehaviour where TContext : class + { + [SerializeField, Range(float.Epsilon, 1f)] + float cellInterval; + [SerializeField, Range(0f, 1f)] + float cellOffset; + [SerializeField] + bool loop; + [SerializeField] + GameObject cellBase; + + float currentPosition; + readonly List> cells = + new List>(); + + protected TContext context; + protected List cellData = new List(); + + protected void Awake() + { + cellBase.SetActive(false); + } + + /// + /// コンテキストを設定します + /// + /// + protected void SetContext(TContext context) + { + this.context = context; + + for (int i = 0; i < cells.Count; i++) + { + cells[i].SetContext(context); + } + } + + /// + /// セルを生成して返します + /// + /// + FancyScrollViewCell CreateCell() + { + var cellObject = Instantiate(cellBase); + cellObject.SetActive(true); + var cell = cellObject.GetComponent>(); + + var cellRectTransform = cell.transform as RectTransform; + + // 親要素の付け替えをおこなうとスケールやサイズが失われるため、変数に保持しておく + var scale = cell.transform.localScale; + var sizeDelta = Vector2.zero; + var offsetMin = Vector2.zero; + var offsetMax = Vector2.zero; + + if (cellRectTransform) + { + sizeDelta = cellRectTransform.sizeDelta; + offsetMin = cellRectTransform.offsetMin; + offsetMax = cellRectTransform.offsetMax; + } + + cell.transform.SetParent(cellBase.transform.parent); + + cell.transform.localScale = scale; + if (cellRectTransform) + { + cellRectTransform.sizeDelta = sizeDelta; + cellRectTransform.offsetMin = offsetMin; + cellRectTransform.offsetMax = offsetMax; + } + + cell.SetContext(context); + cell.SetVisible(false); + + return cell; + } + +#if UNITY_EDITOR + float prevCellInterval, prevCellOffset; + bool prevLoop; + + void LateUpdate() + { + if (prevLoop != loop || + prevCellOffset != cellOffset || + prevCellInterval != cellInterval) + { + UpdatePosition(currentPosition); + + prevLoop = loop; + prevCellOffset = cellOffset; + prevCellInterval = cellInterval; + } + } +#endif + + /// + /// セルの内容を更新します + /// + /// + /// + void UpdateCellForIndex(FancyScrollViewCell cell, int dataIndex) + { + if (loop) + { + dataIndex = GetLoopIndex(dataIndex, cellData.Count); + } + else if (dataIndex < 0 || dataIndex > cellData.Count - 1) + { + // セルに対応するデータが存在しなければセルを表示しない + cell.SetVisible(false); + return; + } + + cell.SetVisible(true); + cell.DataIndex = dataIndex; + cell.UpdateContent(cellData[dataIndex]); + } + + /// + /// 円環構造の index を取得します + /// + /// + /// + /// + int GetLoopIndex(int index, int length) + { + if (index < 0) + { + index = (length - 1) + (index + 1) % length; + } + else if (index > length - 1) + { + index = index % length; + } + return index; + } + + /// + /// 表示内容を更新します + /// + protected void UpdateContents() + { + UpdatePosition(currentPosition); + } + + /// + /// スクロール位置を更新します + /// + /// + protected void UpdatePosition(float position) + { + currentPosition = position; + + var visibleMinPosition = position - (cellOffset / cellInterval); + var firstCellPosition = (Mathf.Ceil(visibleMinPosition) - visibleMinPosition) * cellInterval; + var dataStartIndex = Mathf.CeilToInt(visibleMinPosition); + var count = 0; + var cellIndex = 0; + + for (float pos = firstCellPosition; pos <= 1f; pos += cellInterval, count++) + { + if (count >= cells.Count) + { + cells.Add(CreateCell()); + } + } + + count = 0; + + for (float pos = firstCellPosition; pos <= 1f; count++, pos += cellInterval) + { + var dataIndex = dataStartIndex + count; + cellIndex = GetLoopIndex(dataIndex, cells.Count); + if (cells[cellIndex].gameObject.activeSelf) + { + cells[cellIndex].UpdatePosition(pos); + } + UpdateCellForIndex(cells[cellIndex], dataIndex); + } + + cellIndex = GetLoopIndex(dataStartIndex + count, cells.Count); + + for (; count < cells.Count; count++, cellIndex = GetLoopIndex(dataStartIndex + count, cells.Count)) + { + cells[cellIndex].SetVisible(false); + } + } + } + + public sealed class FancyScrollViewNullContext + { + + } + + public class FancyScrollView : FancyScrollView + { + + } +} \ No newline at end of file diff --git a/Scripts/Layout/FancyScrollView.cs.meta b/Scripts/Layout/FancyScrollView.cs.meta new file mode 100644 index 0000000..d8ff05a --- /dev/null +++ b/Scripts/Layout/FancyScrollView.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 51a6dd27af9048f45a7fc0019884d41e +timeCreated: 1501610618 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Layout/FancyScrollViewCell.cs b/Scripts/Layout/FancyScrollViewCell.cs new file mode 100644 index 0000000..0de4c4c --- /dev/null +++ b/Scripts/Layout/FancyScrollViewCell.cs @@ -0,0 +1,52 @@ +/// Credit setchi (https://github.com/setchi) +/// Sourced from - https://github.com/setchi/FancyScrollView + +namespace UnityEngine.UI.Extensions +{ + + public class FancyScrollViewCell : MonoBehaviour where TContext : class + { + /// + /// コンテキストを設定します + /// + /// + public virtual void SetContext(TContext context) + { + } + + /// + /// セルの内容を更新します + /// + /// + public virtual void UpdateContent(TData itemData) + { + } + + /// + /// セルの位置を更新します + /// + /// + public virtual void UpdatePosition(float position) + { + } + + /// + /// セルの表示/非表示を設定します + /// + /// + public virtual void SetVisible(bool visible) + { + gameObject.SetActive(visible); + } + + /// + /// このセルで表示しているデータのインデックス + /// + public int DataIndex { get; set; } + } + + public class FancyScrollViewCell : FancyScrollViewCell + { + + } +} \ No newline at end of file diff --git a/Scripts/Layout/FancyScrollViewCell.cs.meta b/Scripts/Layout/FancyScrollViewCell.cs.meta new file mode 100644 index 0000000..32abbb5 --- /dev/null +++ b/Scripts/Layout/FancyScrollViewCell.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 73c54b1a82a56fb4f906ab8c75f7a030 +timeCreated: 1501610618 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Layout/HorizontalScrollSnap.cs b/Scripts/Layout/HorizontalScrollSnap.cs index fa532c2..d1dae3c 100644 --- a/Scripts/Layout/HorizontalScrollSnap.cs +++ b/Scripts/Layout/HorizontalScrollSnap.cs @@ -16,6 +16,7 @@ namespace UnityEngine.UI.Extensions _isVertical = false; _childAnchorPoint = new Vector2(0, 0.5f); _currentPage = StartingScreen; + panelDimensions = gameObject.GetComponent().rect; UpdateLayout(); } @@ -192,6 +193,7 @@ namespace UnityEngine.UI.Extensions { _scrollStartPosition = _screensContainer.localPosition.x; _scroll_rect.horizontalNormalizedPosition = (float)(_currentPage) / (_screens - 1); + OnCurrentScreenChange(_currentPage); } /// diff --git a/Scripts/Layout/ScrollPositionController.cs b/Scripts/Layout/ScrollPositionController.cs new file mode 100644 index 0000000..fe6b1ec --- /dev/null +++ b/Scripts/Layout/ScrollPositionController.cs @@ -0,0 +1,312 @@ +/// Credit setchi (https://github.com/setchi) +/// Sourced from - https://github.com/setchi/FancyScrollView + +using System; +using UnityEngine.Events; +using UnityEngine.EventSystems; + +namespace UnityEngine.UI.Extensions +{ + + public class ScrollPositionController : UIBehaviour, IBeginDragHandler, IEndDragHandler, IDragHandler + { + #region Sub-Classes + [System.Serializable] + public class UpdatePositionEvent : UnityEvent { } + #endregion + + [Serializable] + struct Snap + { + public bool Enable; + public float VelocityThreshold; + public float Duration; + } + + enum ScrollDirection + { + Vertical, + Horizontal, + } + + enum MovementType + { + Unrestricted = ScrollRect.MovementType.Unrestricted, + Elastic = ScrollRect.MovementType.Elastic, + Clamped = ScrollRect.MovementType.Clamped + } + + [SerializeField] + RectTransform viewport; + [SerializeField] + ScrollDirection directionOfRecognize = ScrollDirection.Vertical; + [SerializeField] + MovementType movementType = MovementType.Elastic; + [SerializeField] + float elasticity = 0.1f; + [SerializeField] + float scrollSensitivity = 1f; + [SerializeField] + bool inertia = true; + [SerializeField, Tooltip("Only used when inertia is enabled")] + float decelerationRate = 0.03f; + [SerializeField, Tooltip("Only used when inertia is enabled")] + Snap snap = new Snap { Enable = true, VelocityThreshold = 0.5f, Duration = 0.3f }; + [SerializeField] + int dataCount; + + #region Events + [Tooltip("Event that fires when the position of an item changes")] + public UpdatePositionEvent OnUpdatePosition; + #endregion + + Vector2 pointerStartLocalPosition; + float dragStartScrollPosition; + float currentScrollPosition; + bool dragging; + + void IBeginDragHandler.OnBeginDrag(PointerEventData eventData) + { + if (eventData.button != PointerEventData.InputButton.Left) + { + return; + } + + pointerStartLocalPosition = Vector2.zero; + RectTransformUtility.ScreenPointToLocalPointInRectangle( + viewport, + eventData.position, + eventData.pressEventCamera, + out pointerStartLocalPosition); + + dragStartScrollPosition = currentScrollPosition; + dragging = true; + } + + void IDragHandler.OnDrag(PointerEventData eventData) + { + if (eventData.button != PointerEventData.InputButton.Left) + { + return; + } + + if (!dragging) + { + return; + } + + Vector2 localCursor; + if (!RectTransformUtility.ScreenPointToLocalPointInRectangle( + viewport, + eventData.position, + eventData.pressEventCamera, + out localCursor)) + { + return; + } + + var pointerDelta = localCursor - pointerStartLocalPosition; + var position = (directionOfRecognize == ScrollDirection.Horizontal ? -pointerDelta.x : pointerDelta.y) + / GetViewportSize() + * scrollSensitivity + + dragStartScrollPosition; + + var offset = CalculateOffset(position); + position += offset; + + if (movementType == MovementType.Elastic) + { + if (offset != 0) + { + position -= RubberDelta(offset, scrollSensitivity); + } + } + UpdatePosition(position); + } + + void IEndDragHandler.OnEndDrag(PointerEventData eventData) + { + if (eventData.button != PointerEventData.InputButton.Left) + { + return; + } + + dragging = false; + } + + float GetViewportSize() + { + return directionOfRecognize == ScrollDirection.Horizontal + ? viewport.rect.size.x + : viewport.rect.size.y; + } + + float CalculateOffset(float position) + { + if (movementType == MovementType.Unrestricted) + { + return 0; + } + if (position < 0) + { + return -position; + } + if (position > dataCount - 1) + { + return (dataCount - 1) - position; + } + return 0f; + } + + void UpdatePosition(float position) + { + currentScrollPosition = position; + + if (OnUpdatePosition != null) + { + OnUpdatePosition.Invoke(currentScrollPosition); + } + } + + float RubberDelta(float overStretching, float viewSize) + { + return (1 - (1 / ((Mathf.Abs(overStretching) * 0.55f / viewSize) + 1))) * viewSize * Mathf.Sign(overStretching); + } + + //public void OnUpdatePosition(Action onUpdatePosition) + //{ + // this.onUpdatePosition = onUpdatePosition; + //} + + public void SetDataCount(int dataCont) + { + this.dataCount = dataCont; + } + + float velocity; + float prevScrollPosition; + + bool autoScrolling; + float autoScrollDuration; + float autoScrollStartTime; + float autoScrollPosition; + + void Update() + { + var deltaTime = Time.unscaledDeltaTime; + var offset = CalculateOffset(currentScrollPosition); + + if (autoScrolling) + { + var alpha = Mathf.Clamp01((Time.unscaledTime - autoScrollStartTime) / Mathf.Max(autoScrollDuration, float.Epsilon)); + var position = Mathf.Lerp(dragStartScrollPosition, autoScrollPosition, EaseInOutCubic(0, 1, alpha)); + UpdatePosition(position); + + if (Mathf.Approximately(alpha, 1f)) + { + autoScrolling = false; + } + } + else if (!dragging && (offset != 0 || velocity != 0)) + { + var position = currentScrollPosition; + // Apply spring physics if movement is elastic and content has an offset from the view. + if (movementType == MovementType.Elastic && offset != 0) + { + var speed = velocity; + position = Mathf.SmoothDamp(currentScrollPosition, currentScrollPosition + offset, ref speed, elasticity, Mathf.Infinity, deltaTime); + velocity = speed; + } + // Else move content according to velocity with deceleration applied. + else if (inertia) + { + velocity *= Mathf.Pow(decelerationRate, deltaTime); + if (Mathf.Abs(velocity) < 0.001f) + velocity = 0; + position += velocity * deltaTime; + + if (snap.Enable && Mathf.Abs(velocity) < snap.VelocityThreshold) + { + ScrollTo(Mathf.RoundToInt(currentScrollPosition), snap.Duration); + } + } + // If we have neither elaticity or friction, there shouldn't be any velocity. + else + { + velocity = 0; + } + + if (velocity != 0) + { + if (movementType == MovementType.Clamped) + { + offset = CalculateOffset(position); + position += offset; + } + UpdatePosition(position); + } + } + + if (!autoScrolling && dragging && inertia) + { + var newVelocity = (currentScrollPosition - prevScrollPosition) / deltaTime; + velocity = Mathf.Lerp(velocity, newVelocity, deltaTime * 10f); + } + + if (currentScrollPosition != prevScrollPosition) + { + prevScrollPosition = currentScrollPosition; + } + } + + public void ScrollTo(int index, float duration) + { + velocity = 0; + autoScrolling = true; + autoScrollDuration = duration; + autoScrollStartTime = Time.unscaledTime; + dragStartScrollPosition = currentScrollPosition; + + autoScrollPosition = movementType == MovementType.Unrestricted + ? CalculateClosestPosition(index) + : index; + } + + float CalculateClosestPosition(int index) + { + var diff = GetLoopPosition(index, dataCount) + - GetLoopPosition(currentScrollPosition, dataCount); + + if (Mathf.Abs(diff) > dataCount * 0.5f) + { + diff = Mathf.Sign(-diff) * (dataCount - Mathf.Abs(diff)); + } + return diff + currentScrollPosition; + } + + float GetLoopPosition(float position, int length) + { + if (position < 0) + { + position = (length - 1) + (position + 1) % length; + } + else if (position > length - 1) + { + position = position % length; + } + return position; + } + + float EaseInOutCubic(float start, float end, float value) + { + value /= 0.5f; + end -= start; + if (value < 1f) + { + return end * 0.5f * value * value * value + start; + } + value -= 2f; + return end * 0.5f * (value * value * value + 2f) + start; + } + } +} \ No newline at end of file diff --git a/Scripts/Layout/ScrollPositionController.cs.meta b/Scripts/Layout/ScrollPositionController.cs.meta new file mode 100644 index 0000000..a163311 --- /dev/null +++ b/Scripts/Layout/ScrollPositionController.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cc9ad31350b1b6348b57c626195a562d +timeCreated: 1501610618 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Layout/VerticalScrollSnap.cs b/Scripts/Layout/VerticalScrollSnap.cs index 8cb9fbf..762a115 100644 --- a/Scripts/Layout/VerticalScrollSnap.cs +++ b/Scripts/Layout/VerticalScrollSnap.cs @@ -16,6 +16,7 @@ namespace UnityEngine.UI.Extensions _isVertical = true; _childAnchorPoint = new Vector2(0.5f,0); _currentPage = StartingScreen; + panelDimensions = gameObject.GetComponent().rect; UpdateLayout(); } @@ -194,6 +195,7 @@ namespace UnityEngine.UI.Extensions { _scrollStartPosition = _screensContainer.localPosition.y; _scroll_rect.verticalNormalizedPosition = (float)(_currentPage) / (_screens - 1); + OnCurrentScreenChange(_currentPage); } ///