Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Kubold on July 18, 2013, 12:23:44 PM

Title: Asset Bundles Actions
Post by: Kubold on July 18, 2013, 12:23:44 PM
Hi!

I would love to see some Actions to stream Asset Bundles, like:

AssetBundle.Load
AssetBundle.LoadAsync - especially this one :)
AssetBundle.LoadAll


I'm in the point in my project when I need to seamlessly spawn lots of enemies. If I simply go with 'Create Object' and create, for example 40 enemies in 3 seconds, it causes terrible hickups. Actually, any Create Object causes a little glitch.

So far I read that creating and loading AssetBundles asynchronously will fix the glitches (If this is not correct, please tell me how should I do this :)). If there already is an Action like this, please send a link!

Thanks!
Title: Re: Asset Bundles Actions
Post by: Kubold on August 04, 2013, 04:58:55 AM
bump!

If this is, for some reason, impossible, please let me know.
Title: Re: Asset Bundles Actions
Post by: jeanfabre on August 05, 2013, 03:23:55 AM
Hi,

 no, nothing impossible. I am just personaly running behind... :) Keep bumping this please, It is important to provide support for this, so I am willing to make them actions, but need to properly test and allocate the time for it.

bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: 3d_Artist1987 on August 05, 2013, 03:58:04 AM
hi,

i am personally also waiting for asset bundle action!!!

Thanks jeanfabre :)


Dev
Title: Re: Asset Bundles Actions
Post by: Kubold on August 22, 2013, 02:23:10 PM
bump :)
Title: Re: Asset Bundles Actions
Post by: jeanfabre on August 24, 2013, 04:04:05 AM
Hi,

Thanks for reminding! So much to do... :)

 Ok, I have to prepare for Unite next week. So don't expect anything until the week after.

Bye,

Jean
Title: Re: Asset Bundles Actions
Post by: Kubold on September 17, 2013, 04:37:19 AM
bump again
Title: Re: Asset Bundles Actions
Post by: jeanfabre on September 17, 2013, 07:13:29 AM
Hi,

 Thanks for bumping :) I found the time today at last!

 So please have a go at the package attached to this thread. It features the following:

-- action to download from cache or url an assetBundle
-- action to load main asset
-- action to load asset by name
-- action to unload assetBundle

-- a test scene downloading an asset that  I stored on my server ( in "custom samples" folder)
-- Tools to create bundles ( in Assets menu: "Build Asset From Selection")

If that's good for you, I'll put it on the wiki.

bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: Kubold on September 18, 2013, 02:38:44 PM
Thank you so much! You the man! :)
Title: Re: Asset Bundles Actions
Post by: play_edu on July 02, 2015, 02:40:40 AM
Can This Work With Unity 5?
Title: Re: Asset Bundles Actions
Post by: jeanfabre on July 02, 2015, 08:48:26 AM
Hi,

 you should try, I haven't yet. I know Unity 5 has changed the way asset bundles work, so this could be obsolete for sure

 Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: kyy921 on July 24, 2015, 02:20:05 PM
Hi,

 you should try, I haven't yet. I know Unity 5 has changed the way asset bundles work, so this could be obsolete for sure

 Bye,

 Jean

would you renew these action to make it work on Uniyt5?
Title: Re: Asset Bundles Actions
Post by: rik on July 24, 2015, 04:57:16 PM
keep bumping may be jean find some time
Title: Re: Asset Bundles Actions
Post by: jeanfabre on July 27, 2015, 07:18:26 AM
Hi,

 Yep, I have to prepare for Siggraph now, and so dealing with this right now is not realistic, please bump me mid august ok?

Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: posharp on August 30, 2015, 08:12:27 AM
keep bumping. thanks Jean
Title: Re: Asset Bundles Actions
Post by: rik on September 25, 2015, 05:29:23 AM
Hi
jean able to get some time
Title: Re: Asset Bundles Actions
Post by: jeanfabre on September 25, 2015, 07:11:04 AM
no...  :'(

It's on my short list, but I need to clear some pending samples and proxies I need to clean up and push on the Ecosystem, then I'll tackle bundles. I don't want jsut to send actions untested, I need to understand and work with bundles first myself, so I need to set it up and test it.

 but don't worry, it's planned. As they say here. "For monday, but we don't know of which week..."...


Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: Prototype_6492 on November 11, 2015, 04:47:30 PM
Any new info on this?
Title: Re: Asset Bundles Actions
Post by: jeanfabre on November 16, 2015, 07:51:48 AM
Hi,

 on my todos... I need to fofus on finishing a major Ecosystem update first...

Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: rik on November 26, 2015, 06:33:34 AM
HI
Bump any news
Title: Re: Asset Bundles Actions
Post by: jeanfabre on December 02, 2015, 01:08:13 AM
Hi,

 it's still on hold, sorry...

Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: memetic arts on December 17, 2015, 08:00:27 PM
One more bump.

And a question and/or proposal . . . it seems that one of the main sticking points of asset bundles is that you can't include scripts . . . would it make sense, then, to also have an action that could attach scripts to bundled assets, as well as set public variables at runtime?

Because if that is not possible, my project might be dead in the water...  :-\

(well, not really, but finding a workaround would be painful!)

thx

Richard
Title: Re: Asset Bundles Actions
Post by: jeanfabre on December 21, 2015, 02:15:02 AM
Hi,

 PlayMaker are not scripts, so you can include Prefabs with PlayMaker fsms on it.

It's true however that if you want a new action, then you'll need to update your build.

I am not sure I follow your proposal tho, can you clarify? if bundles can not have scripts, you can't write a utility to force this.

As for setting public variables from a bundle, you can, cause as I said, you can include Fsms in your bundles.


 Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: memetic arts on December 22, 2015, 01:58:24 AM
Hi Jean -

Yes, understood re: difference between FSMs and scripts. The problem is that the scripts I'm using aren't so simple to convert to an FSM (at least not for me!). In fact, they are already attached to a prefab. Each scene consists of static instances of the prefabs, with the script's variables manually set before runtime.

What I was proposing was having a "core" FSM that would sit with the app (not in the bundle), and then, as script-less versions of the instantiated prefabs are loaded from the asset bundle, the FSM would attach the script to the instantiated prefabs at runtime.

So, for example, if a game object were loaded from an asset bundle that required a trigger script, at runtime the FSM would find the game object, attach a script component to the GO, and set the script's requisite variables.

The larger question is where to pull the data for setting the variable values from. My guess is that some type of correlating JSON or XML file could be used, managed, most likely, via ArrayMaker, but I'm not sure if that's a viable option. I've used ArrayMaker before, and feel somewhat comfortable with it, but I haven't yet actually retrieved data from an external source.

Is any of this making sense?
Title: Re: Asset Bundles Actions
Post by: memetic arts on December 23, 2015, 02:26:34 PM
<bump>

Wondering if there are any thoughts on this, I'd definitely appreciate any/all input on the topic.

Of course I realize people are traveling now as well, so Happy Holidays to all!!  <|;-)>  (that's the best I could do for a Santa emoticon)

Title: Re: Asset Bundles Actions
Post by: memetic arts on December 30, 2015, 09:12:15 PM
Well, still no response on this, so I guess no harm done -- I've been working with AssetBundles for the past few days, and can confirm that the "No Script" rule as communicated by Unity Tech is a bit misleading.  You actually *can* bundle scripts, as long as they are attached-to and/or referenced by a prefab or other object in a scene AND as long as the referenced scripts are also present in the build of the "receiving" project, e.g. the one that the AssetBundles are being pulled-in to. You *can't* bundle "loose", unassociated scripts.

So, crisis averted, at least for my immediate needs . . . I retract my proposal above! :-)

And again, Happy New Year to all!
Title: Re: Asset Bundles Actions
Post by: jeanfabre on January 13, 2016, 02:09:54 AM
Hi,

Thanks for the clarification.

That sounds like indeed you can't add a new script. Because if the script has to be in the build, than it means it was submitted to apple within the ipa, and then it's not a "new script"...

Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: memetic arts on January 14, 2016, 10:21:31 PM
True, but I was relieved to find out that you could included scripts at all -- for a few days there I thought I was going to have to convert everything over to PM, which would not be a bad thing, of course  :) , but just would have taken a bunch of time that I wasn't initially planning on.

Also . . . I posted a question in the general help forum re: AssetBundles.  Please consider this a slight <bump> . . . I know you're working on the Assetbundle actions for 1.8, consider another huge vote for making those a reality. I've been trying to extend Unity's AssetBundle Manager scripts for LoadAllAssets, and it's not working out very well . . . giving it another go tonight, maybe I'll get lucky!

Cheers
Title: Re: Asset Bundles Actions
Post by: dblincoeii on April 01, 2016, 11:00:02 PM
Any new news on this?  Updates?  I'm having no luck with this.
Title: Re: Asset Bundles Actions
Post by: jeanfabre on April 04, 2016, 03:42:24 AM
Hi,

 I'll have to finish off the first phase of Unity Networking support before I dive into bundles properly.

 Keep bumping please!! It will definitly happen.

Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: stoffl on July 12, 2016, 03:58:12 AM
replacing bundle.Load(assetName.Value))
with bundle.LoadAsset(assetName.Value))
works in 5.x
Title: Re: Asset Bundles Actions
Post by: JOY on February 03, 2017, 01:52:18 PM
Bump for this!
Title: Re: Asset Bundles Actions
Post by: elusiven on February 10, 2017, 04:49:01 PM
Attached an action to load an object.

Only tested with sprites and it works.

Not sure if async works, give it a try :P

Title: Re: Asset Bundles Actions
Post by: srtSteel on March 30, 2017, 01:02:58 PM
Hi! Thanks for sharing, but tools to create bundles does not work in unity 5.5 (playmaker 1.8.3). Please tell me how to use correctly BuildAssetBundles in this script.
Title: Re: Asset Bundles Actions
Post by: smiffy on June 20, 2017, 10:58:59 AM
Any news on this? Could really do with some Asset bundle actions right now :)
Title: Re: Asset Bundles Actions
Post by: NinjaX on July 08, 2017, 11:37:02 AM
B U M P

Does anyone know more about this ? I think I really need Assets Bundles ASAP!!

Any news if playmaker already has this ?
Title: Re: Asset Bundles Actions
Post by: jeanfabre on July 21, 2017, 01:36:51 PM
Hi,

 yes, we need to address this. I'll ask Eric ( dumbGameDev) after he's done with Timeline, I think he could maybe be ok with working on asset bundles.

 Bye,

 Jean
Title: Re: Asset Bundles Actions
Post by: tcmeric on July 21, 2017, 01:43:31 PM
Sure, I will have a look into this and see what can be done.
Title: Re: Asset Bundles Actions
Post by: gregacuna on July 21, 2017, 02:22:29 PM
This would be great. Have been dreaming of asset bundles to help with memory load problems in the WebGL version of the virtual world demo we're working on and would be great if there were actions to make is simple.

Thanks!
Title: Re: Asset Bundles Actions
Post by: finepointcgi on August 21, 2017, 11:57:27 AM
Bump! Any word on this being a thing?

Thanks!
Title: Re: Asset Bundles Actions
Post by: tcmeric on August 21, 2017, 01:16:29 PM
Yes in fact. I started looking over the issue yesterday and have been working on the actions today. I have an early working set and am in the process of expanding on that and making sure my code is clean and tidy. Hopefully in the next few days, I should have a working beta version out for people to try.
Title: Re: Asset Bundles Actions
Post by: gregacuna on August 22, 2017, 12:18:24 AM
That's great news. Looking forward to trying them out. Cheers!
Title: Re: Asset Bundles Actions
Post by: piahouka on October 20, 2017, 08:39:18 AM
Bump!
Title: Re: Asset Bundles Actions
Post by: piahouka on October 20, 2017, 09:01:24 AM
sorry, I found it in GitHub.
Title: Re: Asset Bundles Actions
Post by: Fat Pug Studio on October 20, 2017, 03:09:54 PM
Hello, i was reading about asset bundles today, but unity docs are horrible, is using bundle needed if pooling is used and all resources are loaded with the scene?
Title: Re: Asset Bundles Actions
Post by: tcmeric on October 21, 2017, 02:59:56 AM
Hi. A little summary.

Asset Bundles are not related to pooling in anyway. Here my general takes.

1. Asset bundles are used to load/install data for your game, that wasent installed during the initial install.
2. These asset bundles (of data), can be fetched from online or from your local device (iphone, PC, ps4, whatever).

Online

A common thing asset bundles are used for is DLC. This allows you to ship your game, but users can buy (or for free) get more content. Your game then makes a request to the pre-determined server holding your asset bundle, downloads it, and installs it.

I do a fair amount of translation, and a lot of dictionary apps for example don't install all the dictionarys at once. They allow you to choose which ones you want, and then download and install them. This allows apps on the app store to look/remain small, but then choose which big chunks of data you want to download later.

Local Device


Asset bundles are stored as compressed data (like zips). This can shrink file sizes. Your game may come with all the asset bundles within it already. But in order to make certain parts of your game smaller, they can be stored in asset bundles, and only unzipped if they are needed. This way nothing needs to be downloaded offline. (Or maybe you sell a super pack that includes all the DLC, etc).

Other

Basically asset bundles allows for some modularity. I am sure there are other uses that I have not thought about/read about. However, the playmaker actions plus some new tools that unity has been putting out, is making asset bundles easier and easier to use. According to some unity talks, improving asset bundles has been one of their main tasks these past few years.

A tutorial video or two is on my to do list for sure. If people do have any questions, please feel free to ask. Although I am not an expert, I may be able to help.
Title: Re: Asset Bundles Actions
Post by: Fat Pug Studio on October 21, 2017, 07:24:10 AM
Oh, OP spoke about creating objects on runtime, so i thought it had something to do with actually creating object out of some compressed database. Thanks for thorough explanation.

I think this asset (P.A.T.C.H., https://www.assetstore.unity3d.com/en/#!/content/41417) actually utilises bundle, sounds like something like that.
Title: Re: Asset Bundles Actions
Post by: piahouka on October 21, 2017, 01:07:34 PM
Hi,tcmeric.
I wonder what is the best workflow with actions.
I can not understand how to use it especially LoadAssetScene action. 
Please give me an advice.