Пример #1
0
        private static ToastsUi InitToastsUi()
        {
            var targetCanvas   = CanvasFinder.GetOrAddRootCanvas().gameObject;
            var toastContainer = targetCanvas.AddChild(ResourcesV2.LoadPrefab("Messages/ToastContainer1"));

            return(toastContainer.GetOrAddComponent <ToastsUi>());
        }
Пример #2
0
        private static SnackbarsUi InitSnackbarsUi()
        {
            var targetCanvas      = CanvasFinder.GetOrAddRootCanvas().gameObject;
            var snackbarContainer = targetCanvas.AddChild(ResourcesV2.LoadPrefab("Messages/SnackbarContainer1"));

            return(snackbarContainer.GetOrAddComponent <SnackbarsUi>());
        }