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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Popup windows spawn on the incorrect monitor when the Editor is placed near the boundary of scaled monitor next to a monitor with different scaling
- Hidden Tabs do not shift into empty space after closing visible Tabs
- [Android] Application not deployed on a device when "activity-alias" is used in the AndroidManifest
- Shader compile process adds shader ID to the constant buffer name when the word "Globals" is being used in Vulkan
- Audio Mixer Snapshot link to the documentation isn’t working
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
}
rosskelvin111
Sep 23, 2025 16:55
Wutang