Isn't there any way to set live all sprite and room simply?
I create about 10 Game Maker projects a month, and it is very difficult to set all sprites and rooms to live in each project. Is there a way to set everything live with a simple function or reusable code?
----------------
Solved!
AUTO_LIVE.bat
@echo off
setlocal EnableDelayedExpansion
REM Define the directories
set "SPRITES_DIR=..\sprites"
set "ROOMS_DIR=..\rooms"
set "OUTPUT_FILE=..\scripts\scr_live_set_auto\scr_live_set_auto.gml"
:wait_input
REM Wait for user input
pause
REM Create or clear the output file
echo function scr_live_set_auto(){ > "%OUTPUT_FILE%"
REM Loop through each subdirectory in the sprites directory
for /d %%A in ("%SPRITES_DIR%\*") do (
REM Extract the directory name
set "DIR_NAME=%%~nxA"
REM Write to the output file
echo sprite_set_live(!DIR_NAME!,1^); >> "%OUTPUT_FILE%"
)
REM Loop through each subdirectory in the sprites directory
for /d %%A in ("%ROOMS_DIR%\*") do (
REM Extract the directory name
set "DIR_NAME=%%~nxA"
REM Write to the output file
echo room_set_live(!DIR_NAME!,1^); >> "%OUTPUT_FILE%"
)
REM Close the function in the output file
echo } >> "%OUTPUT_FILE%"
REM Go back to waiting for input
goto wait_input
http://gamemaker.kr:3000/matthewstone218/GM_live_auto/src/branch/main/AUTO_LIVE....