Class ScreenView

Namespace: AppMana.InteractionToolkit

The ScreenView component simplifies the management of screen transitions within a Unity UGUI canvas.

public class ScreenView : UIBehaviour

Inheritance

UIBehaviour ← ScreenView

Examples

To transition the screen view, call with the screen or its index.

screenView.Transition(1);

Remarks

It automates transitions and screen activation for UI elements, making it easier to create interactive interfaces.

Key Features: - Automatic Screen Activation: In edit mode, selecting a MaterialScreen child automatically activates it in the hierarchy. - Transition Management: Provides various transition effects (fade, scale, slide, ripple) for smooth screen transitions. - Reactive Property Support: Utilizes UniRx for reactive screen tracking.

Usage: 1. Attach ScreenView to a GameObject in the Unity UGUI canvas. 2. Ensure each child has a MaterialScreen component for representing distinct screens. 3. Configure transitions in the inspector. 4. Use the Transition method to programmatically switch between screens.

Properties

autoSlideInAmount

public bool autoSlideInAmount { get; set; }

Property Value

bool

autoSlideOutAmount

public bool autoSlideOutAmount { get; set; }

Property Value

bool

canvas

public Canvas canvas { get; set; }

Property Value

Canvas

currentScreen

public int currentScreen { get; set; }

Property Value

int

currentScreenReactive

public IReadOnlyReactiveProperty<int> currentScreenReactive { get; }

Property Value

IReadOnlyReactiveProperty<int>

fadeIn

public bool fadeIn { get; set; }

Property Value

bool

fadeInAlpha

public float fadeInAlpha { get; set; }

Property Value

float

fadeInCustomCurve

public AnimationCurve fadeInCustomCurve { get; set; }

Property Value

AnimationCurve

fadeInTweenType

public Tween.TweenType fadeInTweenType { get; set; }

Property Value

Tween.TweenType

fadeOut

public bool fadeOut { get; set; }

Property Value

bool

fadeOutAlpha

public float fadeOutAlpha { get; set; }

Property Value

float

fadeOutCustomCurve

public AnimationCurve fadeOutCustomCurve { get; set; }

Property Value

AnimationCurve

fadeOutTweenType

public Tween.TweenType fadeOutTweenType { get; set; }

Property Value

Tween.TweenType

graphicRaycaster

public GraphicRaycaster graphicRaycaster { get; set; }

Property Value

GraphicRaycaster

lastScreen

public int lastScreen { get; }

Property Value

int

materialScreen

public MaterialScreen[] materialScreen { get; set; }

Property Value

MaterialScreen[]

onScreenBeginTransition

public ScreenView.OnScreenTransitionUnityEvent onScreenBeginTransition { get; set; }

Property Value

ScreenView.OnScreenTransitionUnityEvent

onScreenEndTransition

public ScreenView.OnScreenTransitionUnityEvent onScreenEndTransition { get; set; }

Property Value

ScreenView.OnScreenTransitionUnityEvent

rippleIn

public bool rippleIn { get; set; }

Property Value

bool

rippleInCustomCurve

public AnimationCurve rippleInCustomCurve { get; set; }

Property Value

AnimationCurve

rippleInPosition

public Vector2 rippleInPosition { get; set; }

Property Value

Vector2

rippleInTweenType

public Tween.TweenType rippleInTweenType { get; set; }

Property Value

Tween.TweenType

rippleInType

public ScreenView.RippleType rippleInType { get; set; }

Property Value

ScreenView.RippleType

rippleOut

public bool rippleOut { get; set; }

Property Value

bool

rippleOutCustomCurve

public AnimationCurve rippleOutCustomCurve { get; set; }

Property Value

AnimationCurve

rippleOutPosition

public Vector2 rippleOutPosition { get; set; }

Property Value

Vector2

rippleOutTweenType

public Tween.TweenType rippleOutTweenType { get; set; }

Property Value

Tween.TweenType

rippleOutType

public ScreenView.RippleType rippleOutType { get; set; }

Property Value

ScreenView.RippleType

scaleIn

public bool scaleIn { get; set; }

Property Value

bool

scaleInCustomCurve

public AnimationCurve scaleInCustomCurve { get; set; }

Property Value

AnimationCurve

scaleInScale

public float scaleInScale { get; set; }

Property Value

float

scaleInTweenType

public Tween.TweenType scaleInTweenType { get; set; }

Property Value

Tween.TweenType

scaleOut

public bool scaleOut { get; set; }

Property Value

bool

scaleOutCustomCurve

public AnimationCurve scaleOutCustomCurve { get; set; }

Property Value

AnimationCurve

scaleOutScale

public float scaleOutScale { get; set; }

Property Value

float

scaleOutTweenType

public Tween.TweenType scaleOutTweenType { get; set; }

Property Value

Tween.TweenType

slideIn

public bool slideIn { get; set; }

Property Value

bool

slideInAmount

public float slideInAmount { get; set; }

Property Value

float

slideInCustomCurve

public AnimationCurve slideInCustomCurve { get; set; }

Property Value

AnimationCurve

slideInDirection

public ScreenView.SlideDirection slideInDirection { get; set; }

Property Value

ScreenView.SlideDirection

slideInPercent

public float slideInPercent { get; set; }

Property Value

float

slideInTweenType

public Tween.TweenType slideInTweenType { get; set; }

Property Value

Tween.TweenType

slideOut

public bool slideOut { get; set; }

Property Value

bool

slideOutAmount

public float slideOutAmount { get; set; }

Property Value

float

slideOutCustomCurve

public AnimationCurve slideOutCustomCurve { get; set; }

Property Value

AnimationCurve

slideOutDirection

public ScreenView.SlideDirection slideOutDirection { get; set; }

Property Value

ScreenView.SlideDirection

slideOutPercent

public float slideOutPercent { get; set; }

Property Value

float

slideOutTweenType

public Tween.TweenType slideOutTweenType { get; set; }

Property Value

Tween.TweenType

transitionDuration

public float transitionDuration { get; set; }

Property Value

float

transitionType

public ScreenView.Type transitionType { get; set; }

Property Value

ScreenView.Type

Methods

Back()

public void Back()

Back(Type)

public void Back(ScreenView.Type transitionType)

Parameters

transitionType ScreenView.Type

NextScreen(bool)

public void NextScreen(bool wrap = true)

Parameters

wrap bool

OnScreenEndTransition(int)

public void OnScreenEndTransition(int screenIndex)

Parameters

screenIndex int

PreviousScreen(bool)

public void PreviousScreen(bool wrap = true)

Parameters

wrap bool

Start()

protected override void Start()

Transition(int)

public void Transition(int screenIndex)

Parameters

screenIndex int

Transition(MaterialScreen)

public void Transition(MaterialScreen materialScreen)

Parameters

materialScreen MaterialScreen

Transition(int, Type)

public void Transition(int screenIndex, ScreenView.Type transitionType)

Parameters

screenIndex int

transitionType ScreenView.Type

Transition(string)

public void Transition(string screenName)

Parameters

screenName string

Transition(string, Type)

public void Transition(string screenName, ScreenView.Type transitionType)

Parameters

screenName string

transitionType ScreenView.Type

See Also

MaterialScreen