playMaker

Author Topic: Global Variables and packages  (Read 7450 times)

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Global Variables and packages
« on: May 07, 2013, 01:48:21 AM »
Hi Guys,

I am working with different groups and I created a scene were I use playmaker global variables. I then made a unity3d package of the scene and sent it to the other people (who each own playmaker) and it doesnt work.

The scene and the FSM's are all there but the Global Variables are missing. It seems that when you create a package, Global Variables are not include which means you have to remake all the Global Variables and edit all the FSM's to get them to work properly.

Is there anyway to make sure the Global Variables are included in the unity3d package.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Global Variables and packages
« Reply #1 on: May 07, 2013, 01:51:11 AM »
Hi,

 you have to export the global vars using the "export globals" from the tools menu of playmaker and include the newly created asset:

Assets/PlayMaker/Resources/PlayMakerGlobals.asset

when you import the package, then you have to user "import globals" from the tool menu of playmaker.

bye,

 Jean

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Global Variables and packages
« Reply #2 on: May 07, 2013, 01:57:13 AM »
Is there anyway to include this file in the unity package

PlaymakerGlobals.asset

....

Sorry, my web browser didnt display the reply. I will try it now. Thank you jean
« Last Edit: May 07, 2013, 01:59:11 AM by joduffy »
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Global Variables and packages
« Reply #3 on: May 07, 2013, 01:58:29 AM »
Hi,

Yes, you have to select it as part of the assets you want to package, it's not going to get selected automatically,

bye,

 Jean

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Global Variables and packages
« Reply #4 on: May 07, 2013, 02:52:33 AM »
Sorry to annoy you Jean.

I am trying to select both the scene file and also the PlaymakerGlobals.asset file. When I export the package it shows all the files that I want. But when I import the package into a different project it only display the PlaymakerGlobals.asset file.

I tried re-making the package several times and I only get either the scene or the PlaymakerGlobals.asset file but not both in the same package.

Again sorry to annoy you over something that seems trivial.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Global Variables and packages
« Reply #5 on: May 07, 2013, 03:09:15 AM »
Here is screen shots showing what is happening
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Global Variables and packages
« Reply #6 on: May 07, 2013, 03:26:19 AM »
Hi,

 Existing assets are not listed when you import a package, that's why you may not see all the content of your package if you have already some there.

If you see the global asset in the assets, then what happens when you "import globals" from playmaker?

bye,

 Jean

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Global Variables and packages
« Reply #7 on: May 07, 2013, 04:41:59 AM »
Sometimes it works and sometimes it doesnt.

But I keep getting the same message saying no "globals to import". Is there a step I am missing

  • Export Globals in scene you want to create a package of
  • Select Scene and File PlaymakerGlobals.assets and create a package
  • in the other project import in the package you made
  • select PlaymakerGlobals.asset from the import list and select import globals from playmaker menu
  • import the whole package by selecting the import button from the popup window
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Global Variables and packages
« Reply #8 on: May 07, 2013, 06:16:35 AM »
It turns out that I did things right.

Ignore the message that says "no globals to import".
It seems to be a bug.

Your globals may or may not be displayed when you import the globals as shown in the previous post.

If your globals are not displayed you need to quit unity and re-load your project. Your global variables will then be displayed in your playmaker scene.
« Last Edit: May 07, 2013, 06:18:37 AM by joduffy »
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Global Variables and packages
« Reply #9 on: May 07, 2013, 06:32:56 AM »
Hi,

 uhm, can you fill out a bug report on this? thanks,

bye,

 Jean

t4d

  • Junior Playmaker
  • **
  • Posts: 70
Re: Global Variables and packages
« Reply #10 on: January 07, 2015, 01:49:43 AM »
same problem where is the solution to import Globals ??  this is a project killer !!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Global Variables and packages
« Reply #11 on: January 07, 2015, 07:36:02 AM »
The PlayMakerGlobals.asset contains the global variables and events used by a project.

If you want to move these to a new project, overwriting all globals, just include the asset in the exported unitypackage - you do not need to use export/import globals.

Use export/import globals if you want to merge (not replace) globals in the target project.

When you export globals, include the PlayMakerGlobals_EXPORTED.asset in the unitypackage (NOT PlayMakerGlobals.asset). Then import the package into the target project and use Import Globals. Import Globals merges the globals from the PlayMakerGlobals_EXPORTED.asset with the existing PlayMakerGlobals.asset. The PlayMakerGlobals.asset should now include all globals from both projects.

Does that help? If you're seeing different behavior please submit a bug report so we can figure out the problem...