Hi there, I’ve been trying to instantiate a text on my mouse position for my clicker game, although it works just fine by instantiating a gameObject, whenever i instantiate a canvas with a text the text is always anchored to the middle of the screen, no matter the position i instantiate it on
void OnMouseDown()
{
corgiAmount += addAmount;
Instance();
}
void Instance()
{
pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
pos.z = 10;
Instantiate(textCanvas, pos, Quaternion.identity);
a.text = "+" + addAmount.ToString("F0") + " corgis";
}
Help would be greatly appreciated!
EDIT: Didn’t get it working but skip the canvas and it works pretty fine