playMaker

Author Topic: Resources Load - Not Storing Prefab into Global Variable  (Read 1828 times)

Budde88

  • Full Member
  • ***
  • Posts: 165
Resources Load - Not Storing Prefab into Global Variable
« on: July 28, 2017, 10:46:54 AM »
So the title says it all,

The Resources Load action seems to find the Prefab I am referencing, but it does not store the Prefab into my pre-defined Gameobject Global Variable.

I have attached an image so it's more clear.

I need help as this is how I want to Save and Load Gameobject variables.

Thanks

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Resources Load - Not Storing Prefab into Global Variable
« Reply #1 on: July 28, 2017, 02:35:50 PM »
I just wanted to add that I have tried with other variable types,
and as my luck would have it, all the others I tested worked.

BUT Prefabs won't store as Gameobjects...

any ideas?

Budde88

  • Full Member
  • ***
  • Posts: 165
Re: Resources Load - Not Storing Prefab into Global Variable
« Reply #2 on: July 28, 2017, 02:52:52 PM »
I found a workaround,

I created an array of gameobjects and fetched them by index.
But it's worth noting that the resources load is not working with storing
prefabs into Gameobject variables.

So this is solved but not solved, so I'm leaving it as unsolved.

Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Resources Load - Not Storing Prefab into Global Variable
« Reply #3 on: July 29, 2017, 03:53:00 PM »
Hi,
When you use it, does it instantiate(create) in your scene?

i just tested on a prefab and it seems to work fine here.

What unity/playmaker version are you on?