You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A use case for @tool scripts is in previewing procedural generation. When preview generation is performance-intensive, @tool scripts can avoid unnecessary re-generation by subscribing to various events representing dependant data modifications; however, changes to the @tool script itself (or dependant @tool scripts) are not able to be detected.
Personally, I make changes from VS Code, and I can observe that my @tool script is hot-swapped almost instantly; however, I'm not able to detect when it is hot-swapped, so I must resort to polling.
It would be ideal if (@tool) Script objects supported a modified signal, which @tool scripts could subscribe to.
Workarounds:
poll the filesystem for the modified date of the script(s),
require the user to manually click @export_tool_button,
require the user to manually reload the project — or close and re-open the scene.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
A use case for
@tool
scripts is in previewing procedural generation. When preview generation is performance-intensive,@tool
scripts can avoid unnecessary re-generation by subscribing to various events representing dependant data modifications; however, changes to the@tool
script itself (or dependant@tool
scripts) are not able to be detected.Personally, I make changes from VS Code, and I can observe that my
@tool
script is hot-swapped almost instantly; however, I'm not able to detect when it is hot-swapped, so I must resort to polling.It would be ideal if (
@tool
)Script
objects supported amodified
signal, which@tool
scripts could subscribe to.Workarounds:
@export_tool_button
,Beta Was this translation helpful? Give feedback.
All reactions