Remove GUI.Label

Hi all,

I have a script attached to a cube - when clicked I use a GUI.Label to show the cube id on screen

GUI.Label(Rect(10,10,300,200),cubeId);

…however if I click multiple cubes then GUI.Label’s start appearing on top of each other rather than clearing the old and showing the new label.

Is there a way of clearing the previous label before adding the new one?

Thx

Jeff

To clarify…

I could use print(cubeId); to show the id while working within Unity but I want this Label text to appear within my game.

So what I simply need is a way to create some status text like the print function which I can call any time without the text appearing on top of the last message.

Thx

Jeff

wow - seems to be a glitch.

Without changing my code - it’s now working and not overlapping.

All fixed!!

Cheers

Jeff

hey can you show me that code i was’n not getting to delete the previous one