Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

how to do slide in/out animation of popup window

Discussion in 'Animation' started by andrew_pearce_, Jun 3, 2019.

  1. andrew_pearce_


    Nov 5, 2018

    Is there any way to use built in Unity animation system to make popup window slide in from top and slide out to the right when canvas' w/h ratio is variable (different mobile screen sizes).

    If popup's anchor would be top right corner then there are no issues because its position will remain same all the time. However, in real life scenario, the anchor is usually center of the canvas.

    Currently, DOTween does the job but I would like to know if I can do the same with native animation.

    Thanks in advance

    IMPORTANT: I tried to place popup far from top and right borders but that will make animation duration slower or faster, depending on how much actual top/right values differ from the values I used when I was creating animation.