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
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
autoSlideOutAmount
public bool autoSlideOutAmount { get; set; }
Property Value
canvas
public Canvas canvas { get; set; }
Property Value
Canvas
currentScreen
public int currentScreen { get; set; }
Property Value
currentScreenReactive
public IReadOnlyReactiveProperty<int> currentScreenReactive { get; }
Property Value
IReadOnlyReactiveProperty<int>
fadeIn
public bool fadeIn { get; set; }
Property Value
fadeInAlpha
public float fadeInAlpha { get; set; }
Property Value
fadeInCustomCurve
public AnimationCurve fadeInCustomCurve { get; set; }
Property Value
AnimationCurve
fadeInTweenType
public Tween.TweenType fadeInTweenType { get; set; }
Property Value
fadeOut
public bool fadeOut { get; set; }
Property Value
fadeOutAlpha
public float fadeOutAlpha { get; set; }
Property Value
fadeOutCustomCurve
public AnimationCurve fadeOutCustomCurve { get; set; }
Property Value
AnimationCurve
fadeOutTweenType
public Tween.TweenType fadeOutTweenType { get; set; }
Property Value
graphicRaycaster
public GraphicRaycaster graphicRaycaster { get; set; }
Property Value
GraphicRaycaster
lastScreen
public int lastScreen { get; }
Property Value
materialScreen
public MaterialScreen[] materialScreen { get; set; }
Property Value
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
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
rippleInType
public ScreenView.RippleType rippleInType { get; set; }
Property Value
rippleOut
public bool rippleOut { get; set; }
Property Value
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
rippleOutType
public ScreenView.RippleType rippleOutType { get; set; }
Property Value
scaleIn
public bool scaleIn { get; set; }
Property Value
scaleInCustomCurve
public AnimationCurve scaleInCustomCurve { get; set; }
Property Value
AnimationCurve
scaleInScale
public float scaleInScale { get; set; }
Property Value
scaleInTweenType
public Tween.TweenType scaleInTweenType { get; set; }
Property Value
scaleOut
public bool scaleOut { get; set; }
Property Value
scaleOutCustomCurve
public AnimationCurve scaleOutCustomCurve { get; set; }
Property Value
AnimationCurve
scaleOutScale
public float scaleOutScale { get; set; }
Property Value
scaleOutTweenType
public Tween.TweenType scaleOutTweenType { get; set; }
Property Value
slideIn
public bool slideIn { get; set; }
Property Value
slideInAmount
public float slideInAmount { get; set; }
Property Value
slideInCustomCurve
public AnimationCurve slideInCustomCurve { get; set; }
Property Value
AnimationCurve
slideInDirection
public ScreenView.SlideDirection slideInDirection { get; set; }
Property Value
slideInPercent
public float slideInPercent { get; set; }
Property Value
slideInTweenType
public Tween.TweenType slideInTweenType { get; set; }
Property Value
slideOut
public bool slideOut { get; set; }
Property Value
slideOutAmount
public float slideOutAmount { get; set; }
Property Value
slideOutCustomCurve
public AnimationCurve slideOutCustomCurve { get; set; }
Property Value
AnimationCurve
slideOutDirection
public ScreenView.SlideDirection slideOutDirection { get; set; }
Property Value
slideOutPercent
public float slideOutPercent { get; set; }
Property Value
slideOutTweenType
public Tween.TweenType slideOutTweenType { get; set; }
Property Value
transitionDuration
public float transitionDuration { get; set; }
Property Value
transitionType
public ScreenView.Type transitionType { get; set; }
Property Value
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
