playMaker

Author Topic: Question about using Asset Bundle's prefabs  (Read 152 times)

BDFgames

  • Playmaker Newbie
  • *
  • Posts: 36
    • View Profile
Question about using Asset Bundle's prefabs
« on: June 30, 2020, 01:29:46 AM »
Hi. I'm evaluating Asset Bundles and I've gone through every document I can find, but I feel like I'm missing something conceptually: the step from loading the asset bundle to actually using its assets.

I have successfully created and loaded an Asset Bundle that consists of a set of prefabs. However, now that I have the bundle loaded, I don't seem to be able to use the prefabs with a Create Object action outside of that FSM.

I seem to be missing some critical concept.  :)

It looks like that step may be LoadAllAssets, but if I do a LoadAllAssets in a different script, how do I make those assets available to the various other FSMs and scripts that previously used them?

Any advice gratefully accepted. Thanks in advance for your help.  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15330
  • Official Playmaker Support
    • View Profile
Re: Question about using Asset Bundle's prefabs
« Reply #1 on: June 30, 2020, 11:30:23 PM »
Hi,

 Are you using tmeric asset bundle support? https://hutonggames.com/playmakerforum/index.php?topic=20374.msg89357#msg89357

Bye,

 Jean

BDFgames

  • Playmaker Newbie
  • *
  • Posts: 36
    • View Profile
Re: Question about using Asset Bundle's prefabs
« Reply #2 on: July 01, 2020, 01:13:58 AM »
I am, yes, but currently working in C# to get a better understanding of Asset Bundles, as the actual implementation I was hoping would work (i.e. having a set of prefabs in an Asset Bundle that could be made available en masse in different projects) doesn't seem to be aligned with how they actually work (i.e. you appear to have to load and use the assets you want in a single FSM or script). I'm keen to know if I'm correct.  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15330
  • Official Playmaker Support
    • View Profile
Re: Question about using Asset Bundle's prefabs
« Reply #3 on: July 02, 2020, 10:54:57 PM »
Hi,

 I am not sure, I worked on asset bundle using pur c# and it's a tedious indeed, so you will need to experiment and check out examples from the web, that's only like that I could get somewhere, the doc is too cryptic until you understand it yourself...

Bye,

 Jean

BDFgames

  • Playmaker Newbie
  • *
  • Posts: 36
    • View Profile
Re: Question about using Asset Bundle's prefabs
« Reply #4 on: July 04, 2020, 12:06:02 AM »
Cryptic is a good way to describe it. The docs certainly "gloss over" a lot of the background as to the "why", focusing instead on the "how".

Having said that, I think I've finally gotten my head around it, and I'm pretty sure what I had intended to do with asset bundles is not how they actually work. Bummer.

Thanks for your responses anyway, guys.  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15330
  • Official Playmaker Support
    • View Profile
Re: Question about using Asset Bundle's prefabs
« Reply #5 on: July 05, 2020, 09:58:29 PM »
Hi,

What did you want to achieve?

Bye,

 Jean