playMaker

Author Topic: Versioning with Playmaker + git?  (Read 11186 times)

mikewoz

  • Playmaker Newbie
  • *
  • Posts: 1
    • Hololabs Studio Inc.
Versioning with Playmaker + git?
« on: October 03, 2012, 03:57:40 PM »
Hi,

We are trying to figure out a workflow where 2 people can work on a unity project while using Git for versioning. Generally one person does the coding while the other does design/art. However, Playmaker sits between those.

This works fine for C#/Unity scripting, since scripts can be saved and committed independently of the scene, however Playmaker FSMs seem to be stored in the actual scene file (ie, Assets/scene_name.unity). This is a binary file that can't be merged.

Does anyone know of a way of versioning Playmaker FSMs? Is there a way to save them in a non-binary format outside of the .unity scene file?

What if one person wants to create an FSM for a GameObject at the same time as the other person is working on a separate (independent) FSM? Is there no way to work collaboratively like this? If not, is there a way to work in separate projects (eg, a copy of the project) and then copy FSMs from one project to another one?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Versioning with Playmaker + git?
« Reply #1 on: October 04, 2012, 12:46:33 AM »
Hi,

 This is unfortunatly a downside of PlayMaker currently, that it doesn't really work with versionning. Hopefully future version will provide a meta file representing the fsm that in turn can be versionned.

 Right now, I would suggest going with exporting packages. Really trying to cut down your project into chunks and have your people working on these separately and send to each others packages. It will not replace all the benefits from versionning, but it will allow several people to work on different aspect as long as they don't overlap.

bye,

 Jean

allornothing

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Versioning with Playmaker + git?
« Reply #2 on: April 07, 2015, 08:13:57 PM »
Bumping a super old thread, as I'm wondering if things have changed at all in 1.7 / U5 etc

When a prefab contains an FSM, is it possible to version that prefab+FSM independently on git/p4 etc? As far as I can tell FSMs in the scene are stored as part of the scene itself (meaning only 1 person can work on a scene at any one time), but does this extend to prefabs?

Just wondering how collaboration is possible with a playmaker heavy project?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Versioning with Playmaker + git?
« Reply #3 on: April 08, 2015, 02:36:52 AM »
Hi,

 Let me clarify this. I am now totally relying on Github for all my projects, and it works very well.

 A PlayMaker Fsm is a binary file and os you can't work concurrently on a binary file because if there is a conflict, you don't know exactly who change what and how to merge it ( unlike a text file where you can check who delete/created insert new lines and characters, and merge concurrent work together).

 This is true for images, and all assets that are no text basically, so a Unity scene is also impossible to merge ( they are working on it, I think u5 will allow for for this soon)

However, it doesn't mean it's not useful. I woud actually go up to mention that this is mandatory for anything serious where loosing work is not an option :)

Please check my github account, you'll notice that all my projects are Unity projects with PlayMaker, and it works very well.

https://github.com/jeanfabre

All the ecosystem back end is relying on github projects, all the custom samples, custom actions scripts you get from the ecosystem comes from Github, which are Unity projects repositories.


 On top of that, I am not a "terminal" person, and most github googling will show you how to work with github with a terminal, but I just can't work this way... so I use SourceTree, and it's fantastic!

http://www.sourcetreeapp.com/

So you can create either  a bitbucket or github account ( I have both, and I access all of it viy sourcetree).

Give it a go. even if you are the only one working on a project, this will give you peace of mind, that you can't loose work, you'll be able to revert on case of issues, etc etc.

The main thing are:

-- Commit often. litteraly several times per hour, at least everytime a feature is c-- reated, tested validated, so that you progress with a full back up of granular changes.

-- conflicting files is ok to havem, don't panic, you can always choose which one to pick ( your version or their version), simply check with the other author, and choose. SourceTree has everything to deal with this elegantly. If you messed up, revert, no bid deal. It's stressful the first few times you do this, but once you assimilated the processed, you'll be fine.

-- Work with PlayMaker templates. Working with templates means that several developers can work on the project, if you decide who's working on what, templates will be easier to work with. You can even work on the same prefab, the prefab remains unchanged most of the time, if you just need to edit the template logic or something.

-- Work with prefabs. Your scene, typically main scene should be probably entirely made up of prefabs, so that it's never a problem to work on the same scene, but on different features.

-- Use Agile development with your team. make short meetings often and regularly, explain what you will be doing, what's blocking you, etc etc, and so you will be less likely corrupting or working on something that someone else is working on.

-- If you are a remote team, skype is a must. Some people will tell you that calls are a sign of issues on a project, but I more and more disagree. I skype multiple times per day on a project that goes very well ( can't wait to share this with you guys :) ) and it's simply because there is a team effort to saty on top. Short meetings, quick explanations, back to work, commit, pull/push, merge work, and that process is repeats several time per day.

-- Use Trello to define tasks, assign tasks properly, manage them properly, so that the trello board is a clear view of what's going on, so that if you spend few days on another project, you can come back and glance trhough this trello board to see what's going on.


Bye,

 Jean
« Last Edit: April 08, 2015, 02:41:27 AM by jeanfabre »

allornothing

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Versioning with Playmaker + git?
« Reply #4 on: April 08, 2015, 04:11:06 AM »
Thanks for the reply jean, much appreciated. All good info, however I was wondering how the fsm data on prefabs are stored. I understand that FSMs on scene gameobjects are saved as part of the scene file, but what about prefabs? Are they saved as part of the prefab data, or elsewhere?

I've been using version control on all non-unity projects for years, but need to know what files to check out/commit when editing a prefab with playmaker fsm for example.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Versioning with Playmaker + git?
« Reply #5 on: April 08, 2015, 05:01:36 AM »
Hi,

 It's saved in the associcated meta file ( hidden next to each asset).

So basically, your git ignore shoudl ignore the Library Folder, and include everything else.

https://github.com/github/gitignore/blob/master/Unity.gitignore
http://kleber-swf.com/the-definitive-gitignore-for-unity-projects/

Bye,

 Jean

allornothing

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Versioning with Playmaker + git?
« Reply #6 on: April 14, 2015, 05:39:03 PM »
Hi Jean

I've set up Unity editor settings to Visible Meta Files, and set Asset Serialization to Force text as per the FAQs online. I've also set up a gitignore that ignores the library as well as some OS generated files like thumbs.db.

However on making an edit to a prefab fsm, SourceTree is only picking up the change in the .prefab itself, and doens't list the .meta file as having changed.

Is this normal?


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Versioning with Playmaker + git?
« Reply #7 on: April 15, 2015, 03:11:04 AM »
Hi,

 you should not touch any of this settings. It works as is by default.

keep Version control mode to "Hidden Meta Files"
Keep Asset serialization mode to "Mixed"


it could be that your ignore file is actually also ignoring .meta extension? can you paste your gitignore?

Bye,

 Jean

allornothing

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Versioning with Playmaker + git?
« Reply #8 on: April 15, 2015, 08:00:02 AM »
I just followed the directions from the link you posted

http://kleber-swf.com/the-definitive-gitignore-for-unity-projects/


Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Versioning with Playmaker + git?
« Reply #9 on: April 15, 2015, 08:04:07 AM »
To test if it works, commit a project, clone the project in a different folder, make some changes and a new commit, then sync on the other project folder. (actually not sure if you can do this on a single machine, I use multiple computers.. May have to remove the project after you change it and commit, then redo it in the other folder.)

That ignore file should work fine. If unignored files within the repo are changed, they'll be synced.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

allornothing

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Versioning with Playmaker + git?
« Reply #10 on: April 21, 2015, 06:20:47 AM »
Just an update. So far our experience using Git was really good. We had an issue at the start where Sourcetree was ignoring DLL files (so all our middleware including playmaker was not being included - and yes we both own a licence :)) but once we forced that, it was working.

However all of a sudden, we pulled the latest commits and found all playmaker fsms broken. Getting the "behaviour missing" errors on every object with a playmaker component, including prefabs (not just scene).

Any ideas what would cause such a thing to happen? Literally every object in every scene with an FSM is broken. The recent commits were just changes to some sprite sheets and saving the scene changes. There were no merge conflicts or anyone else working on these files.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Versioning with Playmaker + git?
« Reply #11 on: April 21, 2015, 06:57:51 AM »
Hi,

 It's good you mention this problem, I have another member on this forum I am trying to help and he's having the same issue, but it's with the beta dn moving from 4 to 5. Can you give some indication on this project context so we know if it's similar?

 Typically, sourcetree doesn't ignore anything, it's the ignore rules of the repository that are taken into account, BUT the common pitfall is to set ignore rules at a global levels for all repository, it's something I don't recommand doing, but sometimes is overlooked, because of the vocabulary, so if you have problems with files not being picked up, verify you don't have a global ignore rules for that file or type of file.

Also, are you on different OS, windows/mac or using different versions from one contributor to the other?


 Bye,

 Jean

allornothing

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Versioning with Playmaker + git?
« Reply #12 on: April 21, 2015, 07:02:11 AM »
Hi Jean

We are both on Unity 5 with latest Playmaker (not the beta for 1.8). We have a gitignore file in the root of the repo, is there somewhere else global ignore rules are set?

We are indeed on different OS, I am on Win 8.1 and the other machine is Mac running Yosemite, but both running same version of Unity. Both using SourceTree although there seem to be a few differences between SourceTree on PC and Mac.

Thanks for your help - it's a puzzling one!


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Versioning with Playmaker + git?
« Reply #13 on: April 29, 2015, 02:12:36 AM »
Hi,

locate it manually: go to your user folder on your OS, and you'll have a hidden file ".gitignore" open it with a text file and see what's in there ( paste it here if you want me to have a look). and remove the entries you don't want there.

I have this:

Code: [Select]
*~
.DS_Store

also, maybe you could give me access to this rep, and I'll see hwo ti goes both on mac and windows? pm me if you want to do this.

also, can you paste your repository .gitignore content? maybe I'll spot something straight away.


Bye,

 Jean

zombie_farm

  • Playmaker Newbie
  • *
  • Posts: 39
Re: Versioning with Playmaker + git?
« Reply #14 on: April 11, 2016, 10:14:00 AM »
Hi.. so I'm not  a programmer/IT so I'm trying to get git set up. If I buy a license for my developer do I still need this gitignore?