/Snackbar-UI-Utility

Unity package to provide Snackbar UI similar to Android for both Android and IOS builds

Primary LanguageC#MIT LicenseMIT

Snackbar-UI-Utility

Unity package to provide Snackbar UI similar to Android for both Android and IOS platforms.

Disclaimer

This package has made possible by Dented pixel who has created this awesome package LeanTween.
Copyright (c) 2017 Russell Savage - Dented Pixel, Licensed under The MIT License (MIT)

Documentation

Simply Import the package. Once imported you can fine a prefab in DigvijaysinhGSnackbar-UIFramework→ResourcesSnackBar

Prefab location

On that prefab you can find SnackBarUi script component with following settings.

SnackBarUi component

  • Animation Time In Seconds Float - Define the time for slide animation to complete.
  • Auto Hide Bool - Determines whether to auto hide the snack bar or not.
  • Duration In Seconds Float - Only available if Auto Hide is true, determines after how many seconds snack bar should hide.
  • Override With Curve Bool - Determines the ease effect of animation.
  • Ease type enum - Only available if Override With Curve is false, determines the animation ease type from predefined enum.
  • Ease curve Animation Curve - Only available if Override With Curve is true, overrides the animation ease effect with custom curve.

After the prefab is setup, we can display SnackBar from any script by calling

SnackBar.Show("Your message");

And to hide it simply call

SnackBar.Hide();

You need to use following namespace for that

using DigvijaysinhG.SnackBarUtility;

You can also find a Demo scene in Example folder

Example

Donate ♥

If you find the package helpful, consider supporting me on Patreon
It would be really helpful for me and motivates me to keep doing what I am doing right now, for free😁