Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Fat Pug Studio on June 23, 2017, 05:29:55 PM

Title: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: Fat Pug Studio on June 23, 2017, 05:29:55 PM
Hi,

is it safe to edit the asset file in spreadsheet software and save it as an asset file again (while unity's off, of course)? Are the values going to be updated?

I have few hundreds of them and it's getting tedious to mess with them in Unity itself.

I think there'll be no problems, but i better double check :)
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet
Post by: gregacuna on June 24, 2017, 03:37:35 AM
How did you get it into a spreadsheet? When I open it I didn't get anything editable.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet
Post by: Fat Pug Studio on June 24, 2017, 09:04:24 AM
It's just a delimited text file, try importing instead of opening if your spreadsheet software is not suggesting the import itself. You can open it in a simple text editor too.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet
Post by: djaydino on June 24, 2017, 10:17:29 AM
Hi,
I have no idea if it is safe or not.
Before you do, make a backup from your project so you can try it out :)
without having permanent damage if it goes wrong :)
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet
Post by: Fat Pug Studio on June 26, 2017, 05:56:19 AM
Just sorted it out with the help of Easy Save 2, Joel mailed me action from Easy Save 3 beta, you can export all your global variables to a neatly comma delimited file, do what you want, and then simply load it back. This is a huge time saver as i already have 700 global variables.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: tcmeric on June 26, 2017, 10:29:01 AM
That sounds awesome! A reason to buy Easy Save 3.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: Fat Pug Studio on June 26, 2017, 05:23:59 PM
Ah, my bad, can't be loaded back in because csv does not support deserialization. But having them all in spreadsheet for analysis and graphs is quite convenient, tho they plan on load from spreadsheet feature in ES3.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on July 01, 2017, 10:31:39 PM
Hey Krmko...I finally got around to trying this and it isn't working for me. Are you talking about the file which Playmaker can export of the globals? When I've tried to open that in a text editor or import it into Excel I'm not getting anything readable.

Hope you can point out how I can create a list of globals. Thanks!
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: Fat Pug Studio on September 27, 2017, 04:51:29 AM
Hey Gregacuna, sorry for late response, i haven't been visiting the forum in a while. You can open the playmakerglobals.asset from the resources folder with notepad++ or excel if you like.

TBH can't wait for easy save 3 to export and import variables from and into a spreadsheet, this is beginning to be a nightmare.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on September 27, 2017, 05:17:03 AM
Hey krmko...when I open it with notepad++ I'm getting a lot of junk. Is there some trick to opening it?
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: Fat Pug Studio on September 27, 2017, 05:42:50 AM
Hmm, are we opening the same file?

ProjectName\Assets\Playmaker\Resources\PlaymakerGlobals.asset

Do you have a screenshot of how it looks when you open it? HerŠµ's how it looks on my side

(https://s26.postimg.org/42vda4knd/image.jpg)
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on September 27, 2017, 08:08:54 AM
Wow...yours looks so beautiful. I'm envious. :) Mine's attached.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: Fat Pug Studio on September 27, 2017, 09:00:16 AM
How's your encoding set up? UTF-8?
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on September 28, 2017, 12:23:10 AM
It defaults to ANSI, but I tried switching to UTF-8 and not much change...looks pretty much like in the image I sent you. This is very strange. Any ideas?
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: Fat Pug Studio on September 28, 2017, 12:58:21 AM
Can you attach the file so i can try opening it to see what will it look like?
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on September 28, 2017, 01:14:32 AM
Wow...thanks for that. I've attached the file. Cheers.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: Fat Pug Studio on September 28, 2017, 03:36:07 AM
Oh, those are regex control characters, i don't know why is the notepad++ showing them. I tried removing them but to no avail.

Post a question on their forums: https://notepad-plus-plus.org/community/
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on September 28, 2017, 03:52:24 AM
Is my file showing them when you open it on your computer? Seems strange they are showing up with mine, but not yours. I'll post to the forums, but wondering what happened when you opened it so I can ask the right question. :)
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: Fat Pug Studio on September 28, 2017, 05:46:47 AM
When i open your file it's the same as on your screenshot, but when i open mine everything's nice and tidy. Quite curious.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on October 02, 2017, 05:56:35 AM
This has me worried. Why are my globals acting differently than yours? I've been meaning to post to the forums about another issue which may be related and is quite scary.

I've been exporting my globals on the project whenever anything important changes as earlier we had a few problems with them. Recently I went to important the globals into a backup of the project and I get a message:

No Globals to Import!

I'm attaching a screen capture of the popup and Console error.

Need to figure this out because I'm wonder what might happen if we really needed the globals file to import and it isn't working.

Any ideas??? @Jean
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: djaydino on October 02, 2017, 09:57:46 AM
Hi,
if you removed the previous global file you might need to restart unity.
i had something similar before.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on October 02, 2017, 10:25:01 PM
Originally this happened in a backup for one of our current games, but this time I tested it by creating a new project with just playmaker and then when I tried to import the globals I received that message.

Am I supposed to delete the globals file before trying to import a new one?

Thanks for all you help. Have a good day!
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: djaydino on October 02, 2017, 10:28:06 PM
Hi,
Did you check if they where added?
Sometimes it gives that message and it still added the globals.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on October 03, 2017, 12:42:25 AM
I tried several things. I check if they were added...nothing.

I tried deleting the current globals and then importing it...nothing.

I've been doing this in Unity 5.4.2 which is the version we started and built our Acting Kindly game in. Should I try it on a clean install of Playmaker in 5.6.2 which we're using for the new project?
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: djaydino on October 03, 2017, 11:52:54 AM
Hi,
Maybe you can send the Global so i can test it.
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: gregacuna on October 03, 2017, 11:39:45 PM
The globals from the new project with just the one variable?
Title: Re: Editing PlayMakerGlobals.asset in Spreadsheet [SOLVED]
Post by: djaydino on October 04, 2017, 01:37:37 PM
Hi,
The global that did not work,

I have been testing a bit and found that the best way is to unpack the "PlayMakerGlobals.unitypackage" into your project folder.

Then you should have the file : PlaymakerGlobals_EXPORTED.asset
(in the inspector you can see what globals ar on the "PlaymakerGlobals_EXPORTED.asset" by selecting it.)

Then goto Playmaker/Tools/Import Globals.
Set extension to all files (it is default on .unitypackage)
then look for the "PlaymakerGlobals_EXPORTED.asset" file and export that.