Is there any way that I can delete the b_render var when the b_logic function is activated? I have been trying different solutions for about an hour and nothing works. is there anything I overlooked?
from ursina import *
def b_logic():
print("button pressed")
b_render = Button(scale = (.4,.1),color='red',text="start",on_click=b_logic)
Yes,
destroy(b_render)
will remove the entity completely. If you plan to reuse the button later, I recommend setting.enabled
toFalse
instead.