cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Run : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Debug.Log("hello unity");
print(this.gameObject.transform.position.x); //默认小数位数
print(this.transform.position.x.ToString("F4"));//修改为5位小数
print(this.transform.position.ToString("F3"));
}
// Update is called once per frame
void Update()
{
}
}