playMaker

Author Topic: Merging 2 projects with playmaker functions in both.  (Read 4922 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Merging 2 projects with playmaker functions in both.
« on: January 23, 2013, 06:57:19 AM »
Hi!

I have predominately been developing my game in 2 separate projects.
A graphic rich project, with terrain and buildings and SOME playmaker functionality for simplistic things (opening doors, vehicles driving, turning on and off snow thru collision areas)

I develop my MAIN functionality for multiplayer and character interaction in a totally separate project, with no art at all, ok some characters... this was for simplicity and keeping my head clear...

Now I feel is a good time to merge the 2 projects, and Im wondering what pitfalls I should out for, adn indeed what method I should use!

A) Should I manually copy folders and files from the programing project into the graphic project and then launch that one, and tweak?

B) Should I make a Unity package of the programming project in import it into the other.

What is the right approach to avoid clashes and errors?

and... what COULD go wrong?

Mark

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Merging 2 projects with playmaker functions in both.
« Reply #1 on: January 23, 2013, 07:02:04 AM »
Actually, after thinking ofr 20 seconds I realise that both my approaches are flawed, sure that would get the 2 projects together in one project, but they would remain in different scenes, I need to ADD THE PROGRAMING developed in that one to the graphical project...

How do I do that?

Mark

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Merging 2 projects with playmaker functions in both.
« Reply #2 on: January 24, 2013, 08:54:44 AM »
Hi,

 you will need to package one or the other really... If you haven't developeed your functionality to accept different graphical assets, then you will struggle a bit to cobine them both really. it depends very much on what you need to change really, if it's your main character, then you are better off rebuilding it. you can try to swap components ( like selecting a different mesh etc etc), but I suspect more work than actually copy pasting components.

bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Merging 2 projects with playmaker functions in both.
« Reply #3 on: January 25, 2013, 03:48:04 AM »
Well in a way the so called "programming project" containing all my photon stuff, is all about the character, but still contains only placeholder meshes for the Main character(s). This is the project that I think needs to be packaged and imported into the "graphical" project". This project only has a simple FPS character capsule controller as a player, for viewing in game. (although I do have some particle stuff attached, rain snow leaves etc for localized environment stuff. (but that will be easy to add to the real character.

NO.. what IM really wondering about in this process, is how is it to import on project that has playmaker into another that also has playmaker stuff. Do I omit the playmaker folder from the package? Surely this is likely to throw up some missing scripts and such like, or is that fgonna work. Assuming both projects have a root playmaker folder, with actions folder in that... as default, will one folder over writing the other, break on prejects FSMs or will they link up seamlessly?

I guess I just have to back up and try? I just wanted some "Be careful to not forget to..." kind of advice..

Plus I think its pretty useful advice, as Im sure most people are doing quick test projects to try out stuf, and then later want to implement that into the main project.

:)

Mark

 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Merging 2 projects with playmaker functions in both.
« Reply #4 on: January 28, 2013, 01:31:17 AM »
Hi,

the biggest pitfalls when moving playmaker stuff from one project to other are:

 -- forget to add to the package all the custom actions. they unfortunatly do not get referenced when you package, that's why I suggest you always keep ALL your custom actions in one folder ( PlayMaker Custom Actions) and then everytime you export your scene, you manually include that folder, and that's out of the way, else your package is dead.

 -- forget to export and import global vars.

 The rest will likely then be a matter of how to replace mesh, materials from dummy to real assets, but that's nothing to do with playmaker and something very specific to each need really...

Bye,

 Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Merging 2 projects with playmaker functions in both.
« Reply #5 on: January 28, 2013, 04:18:19 AM »
Great! Thanks for that, One more quickie question.. when you say

-- forget to export and import global vars.

Is there a process for this? How do I export/import these globals? Is it a manual job, or is there a cleverer way

:)

MArk

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Merging 2 projects with playmaker functions in both.
« Reply #6 on: January 28, 2013, 04:52:19 AM »
Hi,

 No clever way unfortunatly, you simply export the global vars before packaging ( from the playmaker menu), and you include the resource created ion the package, then when import it, you also go to the playmaker menu and import the global vars.

Bye,

 Jean


markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Merging 2 projects with playmaker functions in both.
« Reply #7 on: January 28, 2013, 05:25:39 AM »
Not too tricky, I think even I can manage that, but now another thing.. (Are you fed up with me yet?)

I look at my little Photon project, the one that Im going to try to import into my BIG graphical project) An I notice

A Folder : Playmaker. In side this is the usual stuff, including an Actions folder  BUT NO PHOTON STUFF!!

But I also have a Photon Unity Networking folder, and INSIDE THAT, another Playmaker folder and inside that one another Actions folder, and inside that are the Photon specific actions only.
There is also a Editor/PhotonNetwork containing PhotonViewProfabApply.cs and other scripts, and a scripts folder, that contains the actual PlayMAkerPhotonView.. etc etc etch...

Is there anyway I can tidy any of this up? Or is it too late and I should leave it all as it is, and copy over the whole damn thang?

MArk

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Merging 2 projects with playmaker functions in both.
« Reply #8 on: January 31, 2013, 12:59:42 AM »
Hi,

 that's as tidy as you can get I am afraid :)

 the playmaker folder and photon folder are not something you should carry manually from projects to projects, you should use the unity packages as normal.

 export your stuff as a pacakge. then on that other project, from the asset store, you import playmaker. From the forum you import photon. Then you import your stuff.

Does that make sense?

bye,

 Jean

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Merging 2 projects with playmaker functions in both.
« Reply #9 on: January 31, 2013, 11:27:19 AM »
not sure if it would work, I used this method in the past, search the unity forums for a script that loads the level with the existing level, normally this is done at run time in the game however the script runs in the editor, a little caution is needed so you do not get 100's of imports of your level, but I did get it working (imported the level twice, had to delete 1), if I can remember the script will link it.

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Merging 2 projects with playmaker functions in both.
« Reply #10 on: January 31, 2013, 11:47:41 AM »
this is not the one I used in the past however it looks like it may be just as good

as jean suggests, export / import package from one scene to the other, then load the levels together as described here
http://forum.unity3d.com/threads/19803-Scene-Copy-game-objects-from-one-scene-to-another

I used a similar method as I was developing the UI in a seperate project to my game, both had playmaker assets, one had ngui the other didnt etc, I think I may of even copied the asset folder over from one to the other instead of import export though it was some time ago so I cant be sure.
« Last Edit: January 31, 2013, 11:54:59 AM by Sjones »