playMaker

Author Topic: Split text file for Playmaker arrays  (Read 7601 times)

playsteven

  • Junior Playmaker
  • **
  • Posts: 75
Split text file for Playmaker arrays
« on: June 22, 2016, 06:46:47 AM »
Hey there,

Is there any chance we could have an action to split a text file to the built in Playmaker arrays?

I use the ArrayMaker version, and they are ultra handy, but I am loving the way arrays work in Playmaker now  :D

Thank you,
Steven

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Split text file for Playmaker arrays
« Reply #1 on: June 23, 2016, 03:10:31 AM »

playsteven

  • Junior Playmaker
  • **
  • Posts: 75
Re: Split text file for Playmaker arrays
« Reply #2 on: June 24, 2016, 03:10:04 AM »
Thanks, Jean  :D

That's absolutely brilliant!

All the best,
Steven

playsteven

  • Junior Playmaker
  • **
  • Posts: 75
Re: Split text file for Playmaker arrays
« Reply #3 on: June 24, 2016, 05:30:33 AM »
Jean, I'm trying to grab the action on Ecosystem and I'm mostly getting JSON and 500 errors. When the search works, I can't see this action  :(

Could I possibly get this action outside the Ecosystem?

Thanks,
Steven

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Split text file for Playmaker arrays
« Reply #4 on: June 27, 2016, 03:46:44 AM »
Hi,

 yes, All Ecosystem content is available publicly, on various github repositories.

this one is here

 Bye,

 Jean

playsteven

  • Junior Playmaker
  • **
  • Posts: 75
Re: Split text file for Playmaker arrays
« Reply #5 on: June 27, 2016, 04:17:58 AM »
Perfect   :D

Thanks, Jean

zoic

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Split text file for Playmaker arrays
« Reply #6 on: October 05, 2017, 02:20:47 PM »
Any action to split texture atlas to playmaker array texture ?
Action for text works perfect and helped a lot

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Split text file for Playmaker arrays
« Reply #7 on: October 11, 2017, 03:36:04 AM »
Hi,

do you mean the sprite packer? https://docs.unity3d.com/Manual/SpritePacker.html

 where did you get this texture atlas and do you have the data related to each items in this atlas  ( the rect values for each sub textures)

 Bye,

 Jean

zoic

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Split text file for Playmaker arrays
« Reply #8 on: October 11, 2017, 05:44:12 AM »
ty for answer .
Edited
 yes im talking about texture atlas made in photoshop kinda like in sprite packer and split it to sprites and add them to array list


for example printscreen .

 it is png texture splited to sprites in sprite editor(yes i have rect values )

and then sprites was selected in array list one by one with hands

maybe its possible to do it with action ? like it was with text
need only auto select and add sprites to array list (splitting itself can be easy done in sprite editor)

i take it from assets menu
Ty








« Last Edit: October 11, 2017, 10:31:38 AM by zoic »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Split text file for Playmaker arrays
« Reply #9 on: October 12, 2017, 04:12:24 AM »
Hi,

 without data on where each texture is inside the atlas, it's not possible unfortunatly. Do you have the atlas definition somehow?

 bye,

 Jean

zoic

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Split text file for Playmaker arrays
« Reply #10 on: October 12, 2017, 08:49:07 AM »
Hi
In sprite editor sprites have coordinates and ID number(how i call it).

and after split each sprite get that ID number in project manager too .

maybe its possible to use this data ?

i attached texture in zip arhive . its the same as on prtscreens
Ty

« Last Edit: October 12, 2017, 09:42:26 AM by zoic »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Split text file for Playmaker arrays
« Reply #11 on: October 17, 2017, 02:57:34 AM »
Hi,

 no it's not possible without a description of the rect defining each sub texture.

 a rect defines the top left corner and the width and height, so your first sub texture would be

0,0,128,128

meaning top left is 0,0, width and height are 128.

 if you have this data for your texture atlas, then you extract them all, but without this it's not possible.

 bye,

 Jean

zoic

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Split text file for Playmaker arrays
« Reply #12 on: October 17, 2017, 03:32:16 AM »
Hi,

 no it's not possible without a description of the rect defining each sub texture.

 a rect defines the top left corner and the width and height, so your first sub texture would be

0,0,128,128

meaning top left is 0,0, width and height are 128.

 if you have this data for your texture atlas, then you extract them all, but without this it's not possible.

 bye,

 Jean
Hi
maybe i dont understand some specific details

 if you split with any pivot: center or top left,
 first sprite in my example  will be 0,0,128,128

Ok,bad that it not possible to split texture to sprite arrays. Anyway ty for attention  and try  :)
« Last Edit: October 17, 2017, 03:37:35 AM by zoic »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Split text file for Playmaker arrays
« Reply #13 on: October 23, 2017, 02:55:18 AM »
Hi,

 Yes you got it, atlas must have a definition for it's content for where it is in the atlas.

Can you explain your workflow, and why you want to turn texture atlases into Sprite at runtime? This should be done during editing really, maybe you have a good scenario for this to be necessary.

 Bye,

 Jean

zoic

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Split text file for Playmaker arrays
« Reply #14 on: October 23, 2017, 06:27:10 AM »
Hi

for the same reasons why you need array list from text and dont type it by hands )

turning texture atlases in sprites is easy and can be done during editing.

but make an array list from sprites is a pain if you have like 300 sprites for example(select and add  them to list is a pain)

anyway i avoided this with 2d toolkit -it has an option to split atlases and this data can be used  in playmaker
« Last Edit: October 23, 2017, 06:41:38 AM by zoic »