Search Issue Tracker

Active

Under Consideration for 6000.0.X, 6000.2.X, 6000.3.X, 6000.4.X

Votes

1

Found in

2022.3.67f1

6000.0.58f1

6000.2.6f1

6000.3.0b3

6000.4.0a1

Issue ID

UUM-119898

Regression

No

UI Toolkit Editor Window Creator becomes deformed and stretched when the “Enter” key is pressed

-

Steps to reproduce:
# Create a new Unity project using the Universal 3D template
# Create a new Editor window asset (Assets > UI Toolkit > Editor window)
# Open the created Editor window asset
# Press the "Enter" key on the keyboard
# Observe the UI Toolkit Editor Window Creator

Actual results: The UI Toolkit Editor Window Creator is deformed and stretched out

Expected results: The UI Toolkit Editor Window Creator is the same as before pressing the "Enter" key

Reproducible with versions: 2022.3.67f1, 6000.0.58f1, 6000.2.6f1, 6000.3.0b3, 6000.4.0a1

Tested on (OS): macOS Silicon Sequoia 15.6.1

Comments (2)

  1. azizulah247

    Sep 23, 2025 18:48

    using UnityEngine;
    using System;
    using System.Collections.Generic;
    using System.Data.SQLite;

    public class Player : MonoBehaviour
    {
    public string userId;
    public string username;
    public float speed = 5f;
    public float rotationSpeed = 100f;
    private Vector3 position; // x, y, z
    private float rotationY; // Yaw

    void Start()
    {
    position = transform.position;
    rotationY = transform.rotation.eulerAngles.y;
    }

    void Update()
    {
    // Player movement (WASD + Space/Ctrl)
    float forward = Input.GetAxis("Vertical") * speed * Time.deltaTime;
    float strafe = Input.GetAxis("Horizontal") * speed * Time.deltaTime;
    float up = (Input.GetKey(KeyCode.Space) ? 1 : Input.GetKey(KeyCode.LeftControl) ? -1 : 0) * speed * Time.deltaTime;

    Vector3 moveDir = transform.forward * forward + transform.right * strafe + Vector3.up * up;
    Vector3 newPos = position + moveDir;

    // Boundary check (105m x 68m field, y=0 to 10)
    if (newPos.x >= -52.5f && newPos.x <= 52.5f && newPos.z >= -34f && newPos.z <= 34f && newPos.y >= 0f && newPos.y <= 10f)
    {
    position = newPos;
    transform.position = position;
    UpdatePlayerInDatabase();
    }

    // Rotation (Arrow keys)
    float rot = Input.GetAxis("Mouse X") * rotationSpeed * Time.deltaTime;
    rotationY += rot;
    transform.rotation = Quaternion.Euler(0, rotationY, 0);
    }

    void UpdatePlayerInDatabase()
    {
    string connString = "URI=file:football_game_3d.db";
    using (var conn = new SQLiteConnection(connString))
    {
    conn.Open();
    using (var cmd = new SQLiteCommand(conn))
    {
    cmd.CommandText = "UPDATE players SET position = @pos, rotation = @rot, last_active = @time WHERE user_id = @id";
    cmd.Parameters.AddWithValue("@pos", $"{position.x},{position.y},{position.z}");
    cmd.Parameters.AddWithValue("@rot", rotationY);
    cmd.Parameters.AddWithValue("@time", DateTime.Now.ToString());
    cmd.Parameters.AddWithValue("@id", userId);
    cmd.ExecuteNonQuery();
    }
    }
    }
    }

    public class GameManager : MonoBehaviour
    {
    public GameObject playerPrefab;
    private Dictionary<string, GameObject> players = new Dictionary<string, GameObject>();

    void Start()
    {
    InitializeDatabase();
    // Login logic will be added here (UI-based)
    // For demo, spawn a test player
    SpawnPlayer("test_id", "TestPlayer", Vector3.zero, 0);
    }

    void InitializeDatabase()
    {
    string connString = "URI=file:football_game_3d.db";
    using (var conn = new SQLiteConnection(connString))
    {
    conn.Open();
    using (var cmd = new SQLiteCommand(conn))
    {
    cmd.CommandText = @"CREATE TABLE IF NOT EXISTS players (
    user_id TEXT PRIMARY KEY,
    username TEXT UNIQUE,
    password TEXT,
    position TEXT,
    rotation REAL,
    last_active TEXT
    )";
    cmd.ExecuteNonQuery();
    }
    }
    }

    void SpawnPlayer(string userId, string username, Vector3 position, float rotation)
    {
    GameObject playerObj = Instantiate(playerPrefab, position, Quaternion.Euler(0, rotation, 0));
    Player playerScript = playerObj.GetComponent<Player>();
    playerScript.userId = userId;
    playerScript.username = username;
    players[userId] = playerObj;
    }

    // Add methods for Register/Login via UI
    }

  2. rosskelvin111

    Sep 23, 2025 16:55

    Wutang

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.