How is it possible to get a return value from a function in a button?
What I would like to do is:
from ursina import *
app = Ursina()
def on_click():
#Some code
return #Some value
b = Button(on_click = on_click)
def input(key):
if key == "left mouse down":
print(b.returnvalue)
app.run()
but this obviously does not work.