Astra Child

How to set a Custom Start Position for a UIContainer

Estimated reading: 1 minute 0 views

Example

To change the start position of a UIContainer, you should use the SetCustomStartPosition method. It updates the start value for all relevant animations as well.

using Doozy.Runtime.UIManager.Containers;
using UnityEngine;
namespace Sandbox
{
    public class TestClass : MonoBehaviour
    {
        public UIContainer TargetContainer;
        public Vector3 TargetStartPosition;
        public bool JumpToPosition;

        private void OnEnable()
        {
            TargetContainer.SetCustomStartPosition(TargetStartPosition, JumpToPosition);
        }
    }
}Code language: PHP (php)
Share this Doc
CONTENTS
Scroll to Top