Object Selection and Transform with UI Input Field at Runtime in Unity - Short Version

Опубликовано: 04 Октябрь 2024
на канале: DA LAB
846
12

Move, rotate and scale game object at runtime through InputField user interface in Unity.
C# code to apply global and local transform on an object at the runtime in Unity.
It applies two types of scale transformation: even/uniform and uneven/nonuniform.

Long version tutorial:
   • Object Selection and Transform (Move,...  

Panel_Background - Pivot - X: 0, Y: 1, Anchor: top left, Width: 820, Height: 265,
Image: Dark grey with Alpha: 255

Text_Axis - Pivot - X: 0, Y: 1, Anchor: top left, Width: 225, Height: 60

Dropdown_Axis - Pivot - X: 0, Y: 1, Anchors: top left, Width: 225, Height: 50
Delete Option C. Option A: Global, Option B: Local
Dropdown_Axis - Label - Font Size: 36
Dropdown_Axis - Arrow - Pos X: -18, Width: 50, Height: 50
Dropdown_Axis - Template - Viewport -
Content - Height: 40 - Item - Height: 40
Item Checkmark - Width: 40, Height: 40
Item Label - Left: 30, Font Size: 36

Text_Position - Width: 225, Height: 60
Text_X - Width: 35, Height: 60
InputFiled_X - Pivot - X: 0, Y: 1, Width: 150, Height: 40,
InputFiled_X - Text Area - Text - Font Size: 36, Alignment: Middle Vertical
Input Filed Settings - Content Type: Decimal Number

GitHub link to TransformUI script:
https://github.com/DA-LAB-Tutorials/Y...