Skip to content

Commit

Permalink
made hot reloader not skip lines with 'Ursina(' in them anymore. sinc…
Browse files Browse the repository at this point in the history
…e Ursina is a singleton now, it should be safe to call it multiple times, since it returns the existing instance. this will also allow mor code to be reloadable, for example when instantiating Ursina insida a function.
  • Loading branch information
pokepetter committed Aug 21, 2024
1 parent 23ada10 commit 000916b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ursina/prefabs/hot_reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def make_code_reload_safe(code):
dedent_next = False

for line in code.split('\n'):
if 'Ursina(' in line or line.strip().endswith('app.run()') or line.strip().endswith('HotReloader()'):
if line.strip().endswith('app.run()') or line.strip().endswith('HotReloader()'):
continue
if 'eternal=True' in line:
continue
Expand Down

0 comments on commit 000916b

Please sign in to comment.