playMaker

Author Topic: Resources.Loadall[SOLVED]  (Read 5759 times)

finepointcgi

  • Playmaker Newbie
  • *
  • Posts: 7
Resources.Loadall[SOLVED]
« on: August 23, 2017, 11:09:49 AM »
Hey guys,

I have an odd problem I need to load all of the materials in a file in my resources folder into an array and I cant seem to find an action that will load all of them. I found one that will allow me to load them each individually but not one that will do the entire thing at once. I have a script that can do it but i was wondering if playmaker could do it. Heres the gist of my code
   
Object[] obj;
      obj = Resources.LoadAll(path, typeof(Material));
      foreach (Object o in obj) {
         objects.Add (o);
Is there an action that I can use that would do this? Also im running into a massive lag problem when call those materials. Could I do a LoadAsyncAll? Would that fix it? Does playmaker have something like this?
« Last Edit: April 11, 2019, 02:51:52 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Resources.Loadall
« Reply #1 on: August 24, 2017, 03:01:26 AM »
Hi,

uhm, yes, I'll make an action for this. allow me few days and ping me on monday if I haven't got back here with an action ok?

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Resources.Loadall
« Reply #2 on: August 29, 2017, 02:59:56 AM »
Hi,

 Here we go, it's on the Ecosystem.

 There is no ResourcesLoadAll asynch mode unfortunatly, so you'll only get this version. for asynch, you need to load them individually.

 Bye,

 Jean

markflorquin

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Resources.Loadall
« Reply #3 on: April 08, 2019, 09:03:11 AM »
Hi,

How can I access the objects stored in the array using arraymaker? I tried creating an array with the same name reference as the array that contains the materials (in my case). But this does not work. Array proxy remains empty, but the node shows all materials correctly loaded...

Any help is appreciated!
Mark

markflorquin

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Resources.Loadall
« Reply #4 on: April 08, 2019, 09:25:37 AM »
Oh nevermind, I figured out it can be done using standard Array Get action. :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Resources.Loadall
« Reply #5 on: April 11, 2019, 02:51:43 AM »
Hi,

 Ok, cool :)

 Bye,

 Jean

Bennesky

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Resources.Loadall[SOLVED]
« Reply #6 on: July 30, 2019, 08:17:45 AM »
Hi,

I found that the action (Resources Load all) not working, how to write asset path correctly, I try this ;
    - Assets/Resources/Textures
    - Resources/Textures
    - Textures
Nothing works, the Array variable stay null/empty, on the 'Textures' folder I put several  images... I got no problem with 'Resources Load' before..

Thanks..



« Last Edit: July 30, 2019, 08:24:44 AM by Bennesky »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Resources.Loadall[SOLVED]
« Reply #7 on: July 30, 2019, 08:48:27 AM »
Hi,

 All good :)



are you sure you have your textures are not sprites?

Bye,

 Jean

Bennesky

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Resources.Loadall[SOLVED]
« Reply #8 on: July 30, 2019, 10:17:03 AM »
Ok,

It's works , but only when the 'action' start at 'state1' , when I make it start at  'state2' after 'button down' or 'wait' transition its not work... what's wrong?

Thanks, btw it's already fix my problem..

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Resources.Loadall[SOLVED]
« Reply #9 on: July 30, 2019, 12:30:02 PM »
Hi,

 oh woah! that's really weird, I get it as well. I'll check with Alex on this.

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Resources.Loadall[SOLVED]
« Reply #10 on: July 30, 2019, 12:40:19 PM »
Hi,

 ok, fixed. Can you download again from the Ecosystem, let me know how it goes.

 Bye,

 Jean

Bennesky

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Resources.Loadall[SOLVED]
« Reply #11 on: July 31, 2019, 12:32:22 AM »
Hi,

Yes it's fixed, no more problem..

Thanks Jean for quick response...

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: Resources.Loadall[SOLVED]
« Reply #12 on: April 24, 2021, 03:59:04 PM »
For me this action is not working in Unity 2019.4.21 and Playmaker 1.9.1.p5. Is it possible something related to Resources.LoadAll has changed?



No matter what, the array always stays empty.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: Resources.Loadall[SOLVED]
« Reply #13 on: April 24, 2021, 04:40:10 PM »
Got this confirmed by Brokn on discord that this action is broken (pun intended). Can we get a fix?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Resources.Loadall[SOLVED]
« Reply #14 on: May 10, 2021, 03:15:06 AM »
Hi,

 ok, let me see what's going on with this. I'll get back to you when I can repro and have a fix.

Bye,

 Jean