Création 5
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
using Unity.FPS.Gameplay;
|
||||
using TMPro;
|
||||
// using StarterAssets; // <- ajoute ceci si tu utilises StarterAssets
|
||||
|
||||
public class DisplayCharacterHeight : MonoBehaviour
|
||||
{
|
||||
// public Transform headTransform;
|
||||
public TextMeshProUGUI heightText; // le champ TMP dans l'UI
|
||||
public PlayerCharacterController PlayerController;
|
||||
|
||||
void Update()
|
||||
{
|
||||
float height = PlayerController.CurrentCharacterHeight;
|
||||
heightText.text = $"({height:F2}m)";
|
||||
// Debug.Log("Character height: " + height);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user