Essentially, I am trying to have a scoreboard, which upon completion of a task, opens the scoreboard and displays what your score is. However, whenever I run the actual task, it displays the initial value instead of the new variable value. How could I update this value within the window panel?
Sample Pseudocode:
from ursina import *
score=0
def challenge():
score += 2
wp.enabled=True
app = Ursina()
wp = WindowPanel(content=(Text('text' + str(score))) popup=True, enabled=False)
start = Button(parent=scene, text='start', on_click=challenge)
app.run()