using System.Collections; using System.Collections.Generic; using System.Globalization; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class Editor2DController : MonoBehaviour { public InputField Image; public InputField SizeX; public InputField SizeY; public GameObject plane; CultureInfo culture = CultureInfo.CreateSpecificCulture("eu-ES"); // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void UpdatePanel() { if (!Image.text.Equals("")) StartCoroutine(SendingFormController.LoadImage(Image.text, plane)); var x = 1f; if (!SizeX.text.Equals("")) x = float.Parse(SizeX.text, CultureInfo.InvariantCulture); var y = 1f; if (!SizeY.text.Equals("")) y = float.Parse(SizeY.text, CultureInfo.InvariantCulture); plane.transform.localScale = new Vector3(x, 1, y); var scale = plane.transform.localScale; plane.transform.position = new Vector3(scale.x * 5, 0, scale.z * 5); } public void Save() { SceneManager.LoadScene("Location"); } public void Back() { SceneManager.LoadScene("Location"); } }