using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.EventSystems; public class KeyInputDimension : MonoBehaviour { //public GameObject _InputKeyDimension; public TMP_InputField _InputKeyValue; void Update() { for (int i = 0; i <= 9; i++) { if (Input.GetKeyDown(KeyCode.Keypad0 + i)) { AddNumberTo_InputKeyValue(i.ToString()); return; // Exit after adding the number } } // Check for Numpad decimal point if (Input.GetKeyDown(KeyCode.KeypadPeriod)) { AddDecimalPointTo_InputKeyValue(); } if (Input.GetKeyDown(KeyCode.Return)) { CreatePoint(); } } void AddNumberTo_InputKeyValue(string number) { print("-------------show-----2------"+number); _InputKeyValue.text += number; } void AddDecimalPointTo_InputKeyValue() { if (!_InputKeyValue.text.Contains(".")) { _InputKeyValue.text += "."; } } public void AddtoWallFolow(){ print("AddtoWallFolow===="+transform.GetComponent().text); } public void CreatePoint(){ // float Mesure=DOIT.ConvertStringToNumber(transform.GetComponent().text); // //WallPoint wp=new(); // Vector2 Position=new(0,0); // WallPoint start=Instantiate(_G.StartPoint2D); // WallPoint end=WallCreationManager.CreatePoint(Position); // WallCreationManager.CreateLine(start, end); // WallCreationManager._currentWallPoint } }