Help me pls i need to this float will be in game scene. Like counter.
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Scripting.APIUpdating;
public class PlayerController : MonoBehaviour
{
public GameObject holePref;
public GameObject muzzleFlash;
public float speed = 12;
public Transform cam;
public float mouseSensitivity = 2f;
public float jumpHeight = 1;
public float balllimit = 10;
public TextMeshPro txtBall;
bool isGrounded;
Rigidbody rb;
// Start is called before the first frame update
void Start()
{
txtBall = balllimit;
Cursor.lockState = CursorLockMode.Locked;
rb = GetComponent<Rigidbody>();
}
I literally linked you to an example in the documentation of what to do. Have you looked through the documentation for the thing you’re trying to use yet?