Tanoda
UnityEngine.UI.Extensions.HorizontalScrollSnap Class Reference
Inheritance diagram for UnityEngine.UI.Extensions.HorizontalScrollSnap:
UnityEngine.UI.Extensions.ScrollSnapBase

Public Member Functions

void DistributePages ()
 
void AddChild (GameObject GO)
 Add a new child to this Scroll Snap and recalculate it's children More...
 
void AddChild (GameObject GO, bool WorldPositionStays)
 Add a new child to this Scroll Snap and recalculate it's children More...
 
void RemoveChild (int index, out GameObject ChildRemoved)
 Remove a new child to this Scroll Snap and recalculate it's children *Note, this is an index address (0-x) More...
 
void RemoveChild (int index, bool WorldPositionStays, out GameObject ChildRemoved)
 Remove a new child to this Scroll Snap and recalculate it's children *Note, this is an index address (0-x) More...
 
void RemoveAllChildren (out GameObject[] ChildrenRemoved)
 Remove all children from this ScrollSnap More...
 
void RemoveAllChildren (bool WorldPositionStays, out GameObject[] ChildrenRemoved)
 Remove all children from this ScrollSnap More...
 
void UpdateLayout ()
 used for changing / updating between screen resolutions More...
 
override void OnEndDrag (PointerEventData eventData)
 Release screen to swipe More...
 
- Public Member Functions inherited from UnityEngine.UI.Extensions.ScrollSnapBase
void NextScreen ()
 
void PreviousScreen ()
 
void GoToScreen (int screenIndex)
 Function for switching to a specific screen *Note, this is based on a 0 starting index - 0 to x More...
 
void StartScreenChange ()
 Event fires when the user starts to change the page, either via swipe or button. More...
 
Transform CurrentPageObject ()
 Returns the Transform of the Current page More...
 
void CurrentPageObject (out Transform returnObject)
 Returns the Transform of the Current page in an out parameter for performance More...
 
void OnBeginDrag (PointerEventData eventData)
 Touch screen to start swiping More...
 
void OnDrag (PointerEventData eventData)
 While dragging do More...
 
virtual void OnEndDrag (PointerEventData eventData)
 
void SetLerp (bool value)
 Added to provide a uniform interface for the ScrollBarHelper More...
 
void ChangePage (int page)
 Added to provide a uniform interface for the ScrollBarHelper More...
 
void OnPointerClick (PointerEventData eventData)
 

Additional Inherited Members

- Public Attributes inherited from UnityEngine.UI.Extensions.ScrollSnapBase
int StartingScreen = 0
 
float PageStep = 1
 
GameObject Pagination
 
GameObject PrevButton
 
GameObject NextButton
 
float transitionSpeed = 7.5f
 
Boolean UseHardSwipe = false
 
Boolean UseFastSwipe = false
 
Boolean UseSwipeDeltaThreshold = false
 
int FastSwipeThreshold = 100
 
int SwipeVelocityThreshold = 100
 
float SwipeDeltaThreshold = 5.0f
 
Boolean UseTimeScale = true
 
RectTransform MaskArea
 
float MaskBuffer = 1
 
bool JumpOnEnable = false
 
bool RestartOnEnable = false
 
bool UseParentTransform = true
 
GameObject[] ChildObjects
 
- Properties inherited from UnityEngine.UI.Extensions.ScrollSnapBase
int CurrentPage [get, set]
 
SelectionChangeStartEvent OnSelectionChangeStartEvent [get, set]
 
SelectionPageChangedEvent OnSelectionPageChangedEvent [get, set]
 
SelectionChangeEndEvent OnSelectionChangeEndEvent [get, set]
 

Detailed Description

Definition at line 13 of file HorizontalScrollSnap.cs.

Member Function Documentation

◆ AddChild() [1/2]

void UnityEngine.UI.Extensions.HorizontalScrollSnap.AddChild ( GameObject  GO)

Add a new child to this Scroll Snap and recalculate it's children

Parameters
GOGameObject to add to the ScrollSnap

Definition at line 99 of file HorizontalScrollSnap.cs.

◆ AddChild() [2/2]

void UnityEngine.UI.Extensions.HorizontalScrollSnap.AddChild ( GameObject  GO,
bool  WorldPositionStays 
)

Add a new child to this Scroll Snap and recalculate it's children

Parameters
GOGameObject to add to the ScrollSnap
WorldPositionStaysShould the world position be updated to it's parent transform?

Definition at line 109 of file HorizontalScrollSnap.cs.

◆ DistributePages()

void UnityEngine.UI.Extensions.HorizontalScrollSnap.DistributePages ( )

Definition at line 70 of file HorizontalScrollSnap.cs.

◆ OnEndDrag()

override void UnityEngine.UI.Extensions.HorizontalScrollSnap.OnEndDrag ( PointerEventData  eventData)
virtual

Release screen to swipe

Parameters
eventData

Reimplemented from UnityEngine.UI.Extensions.ScrollSnapBase.

Definition at line 242 of file HorizontalScrollSnap.cs.

◆ RemoveAllChildren() [1/2]

void UnityEngine.UI.Extensions.HorizontalScrollSnap.RemoveAllChildren ( bool  WorldPositionStays,
out GameObject[]  ChildrenRemoved 
)

Remove all children from this ScrollSnap

Parameters
WorldPositionStaysIf true, the parent-relative position, scale and rotation are modified such that the object keeps the same world space position, rotation and scale as before
ChildrenRemovedArray of child GO's removed

Definition at line 178 of file HorizontalScrollSnap.cs.

◆ RemoveAllChildren() [2/2]

void UnityEngine.UI.Extensions.HorizontalScrollSnap.RemoveAllChildren ( out GameObject[]  ChildrenRemoved)

Remove all children from this ScrollSnap

Parameters
ChildrenRemovedArray of child GO's removed

Definition at line 168 of file HorizontalScrollSnap.cs.

◆ RemoveChild() [1/2]

void UnityEngine.UI.Extensions.HorizontalScrollSnap.RemoveChild ( int  index,
bool  WorldPositionStays,
out GameObject  ChildRemoved 
)

Remove a new child to this Scroll Snap and recalculate it's children *Note, this is an index address (0-x)

Parameters
indexIndex element of child to remove
WorldPositionStaysIf true, the parent-relative position, scale and rotation are modified such that the object keeps the same world space position, rotation and scale as before
ChildRemovedResulting removed GO

Definition at line 139 of file HorizontalScrollSnap.cs.

◆ RemoveChild() [2/2]

void UnityEngine.UI.Extensions.HorizontalScrollSnap.RemoveChild ( int  index,
out GameObject  ChildRemoved 
)

Remove a new child to this Scroll Snap and recalculate it's children *Note, this is an index address (0-x)

Parameters
indexIndex element of child to remove
ChildRemovedResulting removed GO

Definition at line 127 of file HorizontalScrollSnap.cs.

◆ UpdateLayout()

void UnityEngine.UI.Extensions.HorizontalScrollSnap.UpdateLayout ( )

used for changing / updating between screen resolutions

Definition at line 207 of file HorizontalScrollSnap.cs.


The documentation for this class was generated from the following file: