- Home /
How can i clear specific printed text to console window from code ?
void FixedUpdate()
{
if (checkHits == true)
{
Vector3 fwd = player.TransformDirection(Vector3.forward);
Vector3 left = player.TransformDirection(Vector3.left);
Vector3 right = player.TransformDirection(Vector3.right);
Vector3 back = player.TransformDirection(Vector3.back);
if (Physics.Raycast(player.position, fwd, 1.5f))
{
print("There is something in front of the object!");
}
else
{
print("there is nothing in front to hit !!!!!");
}
if (Physics.Raycast(player.position, left, 1.5f))
{
print("There is something in left of the object!");
}
else
{
print("there is nothing in left to hit !!!!!");
}
if (Physics.Raycast(player.position, right, 1.5f))
{
print("There is something in right of the object!");
}
else
{
print("there is nothing in right to hit !!!!!");
}
if (Physics.Raycast(player.position, back, 1.5f))
{
print("There is something in back of the object!");
}
else
{
print("there is nothing in back to hit !!!!!");
}
checkHits = false;
}
}
I want to clear by a button click or just by calling a method only what i printed. Not errors or warnings that might be only what i printed here. Is it possible ?
Comment