Unity UIElements: الانطباعات الأولى في الإنتاج

اليوم سوف نشارك انطباعاتنا عن العمل مع إطار العمل المشهود من Unity - UIToolkit ، المعروف أيضًا باسم UIElements. سنغطي ميزاته الرئيسية دون التعمق في الكود. تجدر الإشارة إلى أن الفريق ليس لديه خبرة سابقة في العمل مع تخطيط الويب والأشياء الواضحة للمحترفين في هذا المجال قد لا تكون واضحة لنا.



صورة



ملاحظة من شريك MAI IT-center ومنظم برنامج الماجستير " VR / AR & AI " - PHYGITALISM .



خلفية



Unity IMGUI , . , , : , . IMGUI UGUI , . UI (Canvas, Image, Button .). IMGUI, : ( ), , , ..



, UGUI, Unity Asset Store. , DoozyUI , , — Procedural UI Image.





Unity 2019.1 — UIElements ( UIToolkit, ) — Unity. , Editor, Runtime roadmap.



صورة

Building UI for games with the new UI Builder — Unite Copenhagen.



HTML/XAML/XML CSS . UIElements : UXML , USS , .. , , . , , , USS ( ).



صورة

Building UI for games with the new UI Builder — Unite Copenhagen.



UIElements



: preview . , ?



, , 3D 2D , . , GUI . Unity UGUI Canvas, CanvasGroup, LayoutGroup. , . .



, UIElements.



-, runtime. . runtime Unite 2018 .



-, UI. , UGUI .



-, 2D GUI . UI ? .



-, UI . , , . UGUI , .



, Unity , — , Unity . — UGUI.





UIElements . 2019.4, 2020.1 .



runtime , , . - , , runtime. .



. UIElements UGUI. Unity , , UI , . . , UIElements .



Flexbox , , Unity , . , USS CSS , UIElements. , , , , UIBuilder — . UIElements , UGUI, .. UGUI . . , — . .



best practices . , ? . ? , . ? , , , . : - . , -- best practices , , — . .



UIElements UI, IMGUI , , . , , , UIElements , — UIElements . , , .



, , . UGUI, . . Figma, Unity, . , Figma flexbox, CSS , . USS CSS , , . Unity UIBuilder. UIElements inlined styles, UXML. , . . . , , . , , , UGUI.



, . DOTween Pro , , 2D , DOTween.

2020.1 , DOTween’, c . UIToolkitUnityRoyaleRuntimeDemo:



public void AnimatedScale(float endScale, float tweenDuration)
        {
            experimental.animation
               .Scale(endScale, Mathf.RoundToInt(tweenDuration * 1000))  
               .Ease(Easing.OutQuad);
        }

       public void MoveTo(Vector2 screenPosition)
        {
            transform.position = 
              new Vector3(
                 screenPosition.x, 
                 screenPosition.y, 
                 transform.position.z);
        }

       public void AnimatedMoveTo(Vector2 endPosition, float tweenDuration)
        {
            experimental.animation
                .Position(
                    new Vector3(
                        endPosition.x, 
                        endPosition.y, 
                        transform.position.z),
            Mathf.RoundToInt(tweenDuration * 1000)).Ease(Easing.OutQuad);
        }


Listview UIElements — , . UGUI “ ” , EnhancedScroller, . , .

. , . , EventSystem Event Generation: Read Input ( ) IMGUI Events.



صورة

Read Input Listview , .. ProcessMouseEvents() UIElementsEventSystem . IMGUI Events . , . , Unity Technologies.



. -. , CSS , . . VisualElement , UIBuilder. , , inlined , , — . , . , . . UIElements , .



, — , . , , Unity UIElements.



, , Unity. , . Windows WebGL, , . - UIElements . , . , , .





, UIElements , .. , Google, , Unity .



, , ?



صورة

Unity Forum.



, UIElements PC , , UIElements. “” , , UGUI.




All Articles