问题
So I've been working on a game with a friend and we've run into a continuing problem with the .yyp file.
At first we had the .yyp
file under git control but whenever one of us would pull down the the other's changes the game wouldn't be able to run because of what appeared to be OS specific setup in this .yyp
file.
So naturally we added this file to your .gitignore
and moved on with our lives, until we noticed that no Objects one of us added would be in the other's environment. Further digging showed that this .yyp
file also stores a JSON list of objects added to the game and/or stage.
Has anyone successfully worked with a GMS2 project between OSX and windows? How can this be accomplished?
Thanks in advance
回答1:
What you can do, for this kind of config file (which need to be kept into source control), is to version a script able to generate the right .ypp
file depending on the current OS where those files are checked out.
With Git, you would define a smudge/clean process which will do just that automatically when filling a working tree, whereas a commit will store the same config file with its original content (file.Windows.ypp
, or file.Mac.ypp
).
See also "How can I track system-specific config files in a repo/project?".
A git checkout
of the working directory will trigger the smudge
process, running a script of your choice in order to generate the content .ypp
files with adequate information, while keeping them private (ignored).
来源:https://stackoverflow.com/questions/49203179/gamemaker-studio-2-collaboration-between-windows-and-osx