playMaker

Author Topic: Resources Load  (Read 20087 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14126
  • Official Playmaker Support
    • View Profile
Re: Resources Load
« Reply #30 on: July 14, 2015, 11:00:45 PM »
Hi,

I know... It's because I developed the last feature using an api from the latest beta that is not available in previous version... d'oh!!

so I corrected it, but I also found out what's likely the cause for this action to not work anyway.

 I Can only get the type of the object you want to load from resource if the FsmVariable you will save it into has a reference to one of these object, else the system return the generic type and so I can't assume it's a sprite or an audio or else.

so to fix this, simply assign to your fsmVariable of type Sprite, an actual sprite, then it will work. I'll see with Alex if there is a way to get this without this hack, maybe PlayMaker exposes it but I haven't found it.

So redownload from the ecosystem this action, and apply the fix I describe and let me know how it goes.

 Bye,

 Jean

phannDOTde

  • Full Member
  • ***
  • Posts: 234
    • View Profile
    • Peter Hann .de
Re: Resources Load
« Reply #31 on: July 28, 2015, 03:45:17 AM »
Hi,
I know... It's because I developed the last feature using an api from the latest beta that is not available in previous version... d'oh!!
........
So redownload from the ecosystem this action, and apply the fix I describe and let me know how it goes.

Hey Jean,

SO SORRY for the [very] late reply, something came up and then I forgot about this :-/ I tested it today and it works great, as soon I'll assign a tmp object to the var as you explained - awesome!

Thank you a ton for fixing this :-)
Best
Peter

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 185
    • View Profile
    • Haven Made
Re: Resources Load
« Reply #32 on: January 04, 2017, 08:58:19 PM »
Hey Jenna,

Did this solve your problems here? Or did you need this action possibly extended or more functionality? Just want to make sure it doesn't get buried and be unsolved.

This action is great - thank you Jean!  It looks like it both loads and instantiates prefabs in the scene; would it be possible to adjust this action or create a new one that gives us the option to just load a prefab into a variable?  Then we can use Create Object to define where we want to prefab to load in the scene.

Thank you!
Best,
Jenna

Sorry for the necro on this one, but the functionality that Jenna was talking about is exactly what I was looking for :) any possibility of this?

:D

-craigz

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Resources Load
« Reply #33 on: January 05, 2017, 11:33:18 AM »
Maybe ArrayListAddAllPrefab action from ecosystem?

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 185
    • View Profile
    • Haven Made
Re: Resources Load
« Reply #34 on: January 05, 2017, 12:24:19 PM »
Maybe ArrayListAddAllPrefab action from ecosystem?

Saw your post on that :D snagged it!

But I guess I'd be looking for something on a smaller scale that way I don't have to load all prefabs at once? :)

So rather than load/instantiate the prefab automatically as is the current action, something to just put the loaded resource into a variable that can then be instantiated at a later point?

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Resources Load
« Reply #35 on: January 06, 2017, 01:01:27 AM »
Well all it does is load into an arraylist for later use.

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 185
    • View Profile
    • Haven Made
Re: Resources Load
« Reply #36 on: January 06, 2017, 10:12:39 AM »
But wouldn't I still need to create some sort of key/index identifier though so I know what game object to get from the array and then instantiate later on?

Farwest

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Resources Load
« Reply #37 on: October 02, 2018, 04:30:32 PM »
Hi,
Is it possible to fix the below issue please? It seems this issue stayed unsolved since 2014. I urgently need this action to Load the object only into a variable, not create a new object too (Currently it creates 2 objects for each object to be loaded).

Thanks

This action is great - thank you Jean!  It looks like it both loads and instantiates prefabs in the scene; would it be possible to adjust this action or create a new one that gives us the option to just load a prefab into a variable?  Then we can use Create Object to define where we want to prefab to load in the scene.

Thank you!
Best,
Jenna

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14126
  • Official Playmaker Support
    • View Profile
Re: Resources Load
« Reply #38 on: October 02, 2018, 11:21:47 PM »
Hi,

 If you follow the next posts, you'll see that this is the expected behaviour.

or else, can you describe what's not working as expected? Maybe I am missing something :)

 Bye,

 Jean

Farwest

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Resources Load
« Reply #39 on: October 03, 2018, 02:56:16 AM »
Before I wrote above post, I already checked all messages here.

Second, I already described the issue I am having on the previous post. But I can repeat again, I want the "loaded resource" to be saved into variable only. I don't want "Resource Load" action to instantiate or create the object I look for again.

If this is an expected behaviour, please fix this and create an alternative action, so it doesn't create duplicate object for me (I am creating the gameobject by using the variable and at the desired location at the desired time. Resource Load creates instantly and at a random place. I don't want this).

Before Resource Load, I had tried to use "FindGameObjectsResourcesWithNameContaining" but it is not saving the object into variable like Find Game Object does (But Find Game Object does not look into assets/resources), then I skipped and started to use Resource Load. As this last one is not working, I won't have any more action that will solve my game mechanic.

I hope I can receive the Support I am looking for soon, my issue is very urgent. I sent you invoice number by PM too.

« Last Edit: October 03, 2018, 03:06:41 AM by Farwest »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4210
    • View Profile
    • jinxtergames
Re: Resources Load
« Reply #40 on: October 03, 2018, 10:27:59 AM »
Hi.
Resource load, loads in the object.
A solution you can use is to disable it right after loading the object.

and activate when needed and set the desired position.

Farwest

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
Re: Resources Load
« Reply #41 on: October 03, 2018, 10:54:17 AM »
Sorry, I can't do that. If I would be at early stages, I would have the opportunity to alter it that way.

However I am at the Alpha stage of the game and making such changes require me to modify hundreds of gameobject components for each prefab, will require me to replace each of their ready Playmaker components.

What I need is, a simple edit/modification or fix to the current Resource Load action, which such unfulfilled request was already made in 2014, I need this in 2018. Thanks for the reply and suggestion.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4210
    • View Profile
    • jinxtergames
Re: Resources Load
« Reply #42 on: October 03, 2018, 10:46:44 PM »
Hi.
Ok, i think this should work.

I have added a Do Not Spawn, But the default is set to false, else it would break the action for other people.
So you will need to change that on all your resource actions that you wish not to spawn the object.

I did a little bit of testing and it seems to work, but be sure to make a backup when you try (you never know)

You can get it from the attachment below.
Let me know if it works, so i can update the action on the Ecosystem :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14126
  • Official Playmaker Support
    • View Profile
Re: Resources Load
« Reply #43 on: October 03, 2018, 11:34:37 PM »
Hi,

 ok, I see. It's important to realize, that ResourcesLoad action is not buggy on that regards, it's a additionnal feature that you are requesting. And yes, disabling straight away is the right way to handle this, and modifying the ResourcesLoad action is one way to achieve this.

 Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4210
    • View Profile
    • jinxtergames
Re: Resources Load
« Reply #44 on: October 04, 2018, 12:57:19 AM »
Hi jean.
The change i did actually does not instantiate, but it does store in a variable and it seems to work also.