Пример #1
0
        public static ScrollbarFixer8 ConfigureDinamicallyCreatedScrollbar(UnityEngine.UI.Scrollbar scrollbar, IOSA iAdapter, RectTransform viewport, bool addFixerIfDoesntExist = true)
        {
            var instanceScollbarFixer = scrollbar.GetComponent <ScrollbarFixer8>();

            if (!instanceScollbarFixer)
            {
                if (!addFixerIfDoesntExist)
                {
                    return(null);
                }
                instanceScollbarFixer = scrollbar.gameObject.AddComponent <ScrollbarFixer8>();
            }
            //instanceScollbarFixer.scrollRect = _WindowParams.scrollRect;
            instanceScollbarFixer.externalScrollRectProxy = iAdapter;
            instanceScollbarFixer.viewport = viewport;

            return(instanceScollbarFixer);
        }