Question by
NoobmasterRan · 4 days ago ·
slidermathf
So...i'm trying to make a computation for this equation.......but how do i make it? and I already made a slider program in which I'm gonna use it as a value of the area and the distance
VOLTAGE
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class VoltValueSlider : MonoBehaviour
{
public Slider slider;
public TextMeshProUGUI sliderText;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
sliderText.text = slider.value.ToString("Volt: 0.00");
}
}
AREA
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class AreaValueSlider : MonoBehaviour
{
public Slider slider;
public TextMeshProUGUI sliderText;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
sliderText.text = slider.value.ToString("Area: 0.00");
}
}
image-2022-06-09-132854022.png
(226.6 kB)
image-2022-06-09-133818202.png
(19.2 kB)
Comment
Your answer

Follow this Question
Related Questions
InverseLerp for vector3 1 Answer
How do I take out a UI Slider's value? 0 Answers
lerp a float value of keyup 2 Answers
Click option is not working in GameView with some different clicker 0 Answers