Hello this worked very well and I thank you but I have been wondering how to make it add different numbers like instead of adding 1 each time it added like 3 thanks!
When using text mesh pro. Simply change using unitys UI system to using TMPro; and also change form public text scoreText; to public TextMeshProUGUI scoreText; and that should work
thank you so much you are such an amazing person you just made me discover a new unity function and omg am I gonna abuse this welp anyways thank you so much you are a great person I hope you go to heaven!
Yes hi. I was just wondering how to subtract a ponit if i press a second button If you could please do a video of this next it would be greatly appreciated.
@Josiah Jacobson i know too XD... I've learned a lot about programming over the past year, i know now how to do it... And it's for sure been a journey :)
@@circular747 You can try this script I'm not sure if that work: using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; using UnityEngine.UI; public class Click : MonoBehaviour { public TMP_Text scoreText; private string score; void Update() { // if (Input.GetMouseButtonDown(0)) { scoreText.text = score.ToString(); //} } public void Addpoint() { score += 1; } }
@@circular747 I have a working script but i works only with mouse click using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; using UnityEngine.UI; public class Click : MonoBehaviour { public TMP_Text scoreText; public float score;
void Update() { if (Input.GetMouseButtonDown(0)) { score++; scoreText.text = score.ToString("0"); } } public void ResetPoints() { scoreText.text = score.ToString("0"); } } AND THE SELL using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class Sell : MonoBehaviour { public Click _Click; public TMP_Text _MoneyText; public float _TotalMoney; void Awake() { }
You are not aware, but saved me and 10 of my classmates our exam. You are awesome, thank you.
exam where you just have to make a button that has some functionality?
Thank you so much for this tut! You showed the stuff super well and clear. It helped a lot! :)
Thanks for this, been trying to figure this out for a few hours now. This was a real life saver.
This was so helpful thank you so much this needs more attention
Thx so much bruh! Ur goated
i love you finally ive had this not working for so long u just earned a sub from me : )
Hi. I am using TextMeshPro how I do that?
Oh that is fine just remove the tmp
on the name
Thank you so much!
can you help me, i did everything like you but it doesn't give me points on click
Hello this worked very well and I thank you but I have been wondering how to make it add different numbers like instead of adding 1 each time it added like 3 thanks!
do you know how to increase the score when you click like every click is 200
First of all... Great Video. I have a question. What about subtracting the score with another Button? Any solutions?
@@alientaker9 i tried but doesnt work for me
When using text mesh pro. Simply change using unitys UI system to using TMPro; and also change form public text scoreText; to public TextMeshProUGUI scoreText; and that should work
love
how to fix int does not contain definition for int
thanks!
I love u for that tutorial
Thanks you are amazing
Thank you so much.
thenk u lal
thank you so much you are such an amazing person you just made me discover a new unity function and omg am I gonna abuse this welp anyways thank you so much you are a great person I hope you go to heaven!
Very Nice thanks you.
thanks so much
Great Video! :)
you just safe a college student LOL thanks
Thanks!
really helped!!
Thanks
heooo! thanks for helping
Yes hi. I was just wondering how to subtract a ponit if i press a second button
If you could please do a video of this next it would be greatly appreciated.
im working on it
@Josiah Jacobson i know too XD... I've learned a lot about programming over the past year, i know now how to do it... And it's for sure been a journey :)
diddnt work :/
same :( (great tutorial tho)
@@circular747 You can try this script I'm not sure if that work:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
public class Click : MonoBehaviour {
public TMP_Text scoreText;
private string score;
void Update() {
// if (Input.GetMouseButtonDown(0)) {
scoreText.text = score.ToString();
//}
}
public void Addpoint() {
score += 1;
}
}
@@circular747 I have a working script but i works only with mouse click
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;
public class Click : MonoBehaviour {
public TMP_Text scoreText;
public float score;
void Update() {
if (Input.GetMouseButtonDown(0)) {
score++;
scoreText.text = score.ToString("0");
}
}
public void ResetPoints() {
scoreText.text = score.ToString("0");
}
}
AND THE SELL
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class Sell : MonoBehaviour {
public Click _Click;
public TMP_Text _MoneyText;
public float _TotalMoney;
void Awake() {
}
private void OnTriggerEnter(Collider other) {
if (other.gameObject.CompareTag("Sell")) {
_MoneyText.text = _TotalMoney.ToString("0");
_TotalMoney += _Click.score;
_Click.score -= _Click.score;
_Click.GetComponent().ResetPoints();
}
}
}
wow
This Sucked He is Amazing Please Support Him