Hello. I asked earlier in the month and received some great help from @empty surge on looping effects and trigger effects. I am now looking at using several particle effects on multiple custom asset bundles. I believe that those would best be placed in a secondary asset bundle, but I am having problems finding information on how to do that, and how to use them afterwards. Any help would be greatly appreciated. Thank you in advance!
#Custom Asset Bundles and Secondary bundles
1 messages ยท Page 1 of 1 (latest)
The reason to use a secondary is to use a common resources shared by multiple assetbundles (for example, when all materials come from the same texture image, or when they all use the same mesh.
Using a secondary for just the particle effects when the particle effects belong to an assetbundle, and are not used in others is not bad, but a bit convoluted
I see @slate crow answered almost the same in the main channel ๐
Yes
In fact, I'm testing a thing right now
I'm wondering, if I have two assetbundles, neither as secondary
One with all the effects, and one using those, but without them in the assetbundle
I wonder if it's going to work out
what do you mean?
I suspect it will, and "secondary assetbundle" is really just a convenience to avoid a really ugly hack of stuffing cubes with effect into the table
I'll show you in a bit
secondary is just "also load this stuff"
Yes
I'm wondering if I have two primary assetbundle objects
Both using the same resources, but only one of them actually having these resources assigned to that assetbundle
still can't figure out what you mean, so when you have visuals, that's going to help ๐
I hope I had stupid assumptions and I can just give up on it instead of having to explain it
But here goes
No hurry, because I cannot read it for the next hour or so ๐
I made four things in Unity and distributed them among 2 assetbundles
They're two primitives, both using the same material with the same image
Here's me loading them in as "real", primary assetbundles - you can see that they can only operate with what's included in the assetbundle
But the things included in assetbundles themselves get thrown into a big "everything" pile by TTS and become accessible as soon as they're in that pile
There are three approaches to this
- Duplicate everything. Very wasteful, don't do that
- Have resources shared among assetbundles and hopefully you won't run into situations where the shared resources bundle isn't loaded
- Have all shared resources on a single master assetbundle and supply that as a secondary to every single object using them - TTS can recognize and avoid duplicating the files that have the exact same name/link
3 is best for performance and worst for you because you'll actually have to like, plan, and do extra work and exercise effort, man
In my case, I'm part of a group of roleplayers who each have animated 3d minis, and our GM does some large tables. We are running the hero system and that mod is fairly resource intensive, so I am trying to limit the resource usage for my characters.
Right.
I always try to make sure nothing gets loaded twice in different assetbundles, and find some logic in distribution.
Example.
I have 20 tokens that use the same mesh, and one texture with all 20 on them.
I make 20 materials from the one texture (tiling the materials).
Create 20 prefabs with different materials. Each prefab assigns it's own assetbundle
Then I assign 1 assetbundle to the mesh and the materials.
I load each token with their own name as primary and the materials and mesh as secondary.
All the tokens are like 1 kb of descriptive data, the mesh and texture are all in that secondary
Ok, In 'theory' I mostly understand what I am doing.... But, uh, how would I assign an animation to a bundle that is actually in a different bundle?
add the animation to another bundle, But in all fairness, unless it's a very long animation, this is hardly worth it