playMaker

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

finepointcgi

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Resources.Loadall[SOLVED]
« on: August 23, 2017, 08: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 10, 2019, 11:51:52 PM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14059
  • Official Playmaker Support
    • View Profile
Re: Resources.Loadall
« Reply #1 on: August 24, 2017, 12: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: 14059
  • Official Playmaker Support
    • View Profile
Re: Resources.Loadall
« Reply #2 on: August 28, 2017, 11:59:56 PM »
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: 3
    • View Profile
Re: Resources.Loadall
« Reply #3 on: April 08, 2019, 06: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: 3
    • View Profile
Re: Resources.Loadall
« Reply #4 on: April 08, 2019, 06:25:37 AM »
Oh nevermind, I figured out it can be done using standard Array Get action. :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14059
  • Official Playmaker Support
    • View Profile
Re: Resources.Loadall
« Reply #5 on: April 10, 2019, 11:51:43 PM »
Hi,

 Ok, cool :)

 Bye,

 Jean