Playmaker Forum

PlayMaker News => General Discussion => Topic started by: joduffy on May 06, 2013, 10:48:21 PM

Title: Global Variables and packages
Post by: joduffy on May 06, 2013, 10:48:21 PM
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.
Title: Re: Global Variables and packages
Post by: jeanfabre on May 06, 2013, 10:51:11 PM
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
Title: Re: Global Variables and packages
Post by: joduffy on May 06, 2013, 10:57:13 PM
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
Title: Re: Global Variables and packages
Post by: jeanfabre on May 06, 2013, 10:58:29 PM
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
Title: Re: Global Variables and packages
Post by: joduffy on May 06, 2013, 11:52:33 PM
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.
Title: Re: Global Variables and packages
Post by: joduffy on May 07, 2013, 12:09:15 AM
Here is screen shots showing what is happening
Title: Re: Global Variables and packages
Post by: jeanfabre on May 07, 2013, 12: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
Title: Re: Global Variables and packages
Post by: joduffy on May 07, 2013, 01: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

Title: Re: Global Variables and packages
Post by: joduffy on May 07, 2013, 03: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.
Title: Re: Global Variables and packages
Post by: jeanfabre on May 07, 2013, 03:32:56 AM
Hi,

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

bye,

 Jean
Title: Re: Global Variables and packages
Post by: t4d on January 06, 2015, 11:49:43 PM
same problem where is the solution to import Globals ??  this is a project killer !!
Title: Re: Global Variables and packages
Post by: Alex Chouls on January 07, 2015, 05: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...