Skip to content

[WIP] Feature/move scripts folder to assets #418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

adriengivry
Copy link
Member

@adriengivry adriengivry commented Mar 30, 2025

Description

  • Removed the requirement to have all the scripts inside of the Scripts/ folder
  • Added folder support for scripts paths
  • Implemented a migration tool to automatically move scripts from Scripts/ to Assets/Scripts/, and update all scenes to use the new path

Related Issues

Fixes #385

To-Do

  • Bug after exiting play mode: scripts become invalid
  • Fix rename/move bug
  • Get rid of projectScriptsPath
  • Prevent same script from being added multiple times
  • Base the m_scriptName on the lua table name instead of the m_scriptPath.stem()
  • TScript should expose a GetTypeName() function
  • Remove the notion of "Behaviour" from the TScriptEngine. The only thing TScriptEngine should do, is manage the context, create scripts from a path, register/unregister a script to the context, and provide a way to call a function (script, funcName, params)

Screenshots

image
When loading a project that uses the old Scripts/ folder

image
Migration tool output (moving scripts from Scripts/ to Assets/Scripts/)

image
Asset Browser with no more Scripts/ folder at the root, but one inside of Assets/

@adriengivry adriengivry added QoL Quality of Life : Something that can improve users productivity Feature Editor Something relative with the editor Project Configuration Anything related to setuping our projects labels Mar 30, 2025
@adriengivry adriengivry self-assigned this Mar 30, 2025
@adriengivry adriengivry force-pushed the feature/move_scripts_folder_to_assets branch from f2e2aec to 4b96a64 Compare March 30, 2025 04:15
@adriengivry adriengivry changed the title Feature/move scripts folder to assets [WIP] Feature/move scripts folder to assets May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editor Something relative with the editor Project Configuration Anything related to setuping our projects QoL Quality of Life : Something that can improve users productivity
Development

Successfully merging this pull request may close these issues.

Move scripts to the Assets/ folder
1 participant