Комментарии:
this video sux ass
Ответитьthis isn't straight forward
ОтветитьNot sure "this background" music is appropriate for a tutorial video
ОтветитьSo crazy how long it takes to just find out which package you have to declare "using TMPro;"
ОтветитьThank you so much
Ответитьyou are the best brother, thank you
Ответитьthank you brother
ОтветитьMicrosoft documentation helps, I started a few days ago and could fix this error once I though about it
Ответитьthank you so much for this! ^^
ОтветитьI did this but it gave me an error,
"NullReferenceException: Object reference not set to an instance of an object"
Here is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class TextUpdate : MonoBehaviour
{
private TextMeshProUGUI textMesh;
public int health;
// Start is called before the first frame update
void Start()
{
textMesh = FindObjectOfType<TextMeshProUGUI>();
}
// Update is called once per frame
void Update()
{
textMesh.SetText(health.ToString());
if (Input.GetKeyUp(KeyCode.Space))
{
health--;
}
}
}
finally someone who can explain how to do this correctly.
Ответитьi have a problem with my script, can you help me out?
(basically, all i want to do, is to set all keys to saying "e")
heres the script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class textE : MonoBehaviour
{
public TextMeshProUGUI _textMeshProKeyPressed;
// Update is called once per frame
private void Update()
{
_textMeshProKeyPressed.SetText("KeyPressed: {currentInput}");
if (Input.GetKey(KeyCode.D))
{
SetCurrentKeyPressedText(currentinput, "E");
}
}
}
also in the compiler, it says: The name SetCurrentKeyPressedText does not exist in any context
Forget about your brother and your coding friend and your dog and the weather and all that stuff. Get straight to the subject in your first sentence. You present some good info here but get rid of all the other stuff.
ОтветитьMost important thing is the first line of this code:
using TMPro
No idea where you are from the start!
ОтветитьTHANK YOU 🙏!
Ответитьwhen I try to make a TextMeshPro element, it makes it a UI, but not UGUI. What do I do?
ОтветитьThank you for helping me with my uni project!
ОтветитьHmm this doesn't seem to be working right now. Have they changed the API?
Ответить