GameAnalytics / GA-SDK-ROBLOX

Repository for GameAnalytics Roblox SDK
MIT License
68 stars 44 forks source link

Use rojo build instead of the current method of creating a rbxmx #98

Closed tacheometry closed 3 years ago

tacheometry commented 3 years ago

Rojo 6/7's CLI has a rojo build command, which generates a Roblox compatible file (rbxm, rbxmx, etc.) from your Rojo project file. This is much better than using the current generate_rbxmx_file.py script!

A way to approach this is by creating another project.json file. The current default.project.json is for syncing a DataModel. However, to create your current rbxmx structure, this new project file should sync a Folder. For example, I will call this model.project.json:

{
    "name": "GameAnalyticsSDK",
    "tree": {
           "$className": "Folder",
           "MOVE ME TO CLIENT": {
                "$path": "GameAnalyticsSDK/GameAnalyticsClient"
            },
            "MOVE ME TO SERVER": {
                "$path": "GameAnalyticsSDK/GameAnalytics"
            }
        }
    }
}

Now, when I pass this file to rojo build in a console, like this:

rojo build model.project.json --output="release/GameAnalyticsSDK.rbxmx"

a GameAnalyticsSDK.rbxmx file will get correctly generated in the release directory.

the1schwartz commented 3 years ago

Thanks for the tip. I have migrated over to to use rojo build command now to generate .rbxmx file