Git Product home page Git Product logo

Comments (10)

sassembla avatar sassembla commented on July 19, 2024

ah-- I found that you means "use same shaders & materials both Cube & Sphere, create these 2 AssetBundles and there are dependency"?

how about the graph like below.

2016-04-15 21 48 52

should check the Bundlizer0's "Output Resources" check is ON.

2016-04-15 21 49 04

from assetgraph.

oppaikir avatar oppaikir commented on July 19, 2024

Hi, thanks for answers.

Well, the "dependency" I mean is one assetbundle dependens to another assetbundle, which owned the asset that using/linking by other assetbundle's assets.

For example, I create a material, and use on a cube and a sphere(two MeshRenderer reference to same material. )

Now I want to build cube.prefab to Cube.assetbundle, and build sphere.perfab to Sphere.assetbundle.

If I didn't build the material to an assetbundle,
then in Cube and Sphere assetbundles will copy material in themselves - I don't want this because data size is coming bigger. (double material, double texture, double shader... )

What I want to do is build common data to a assetbundle, then when I build new assetbundle which have assets link to these common data, it will not copy, just dependencies to other assetbundles.

Can AssetGrpah do this thing?
Thank you very much.

from assetgraph.

oppaikir avatar oppaikir commented on July 19, 2024

Oh, sorry that I typing too slow.
I saw the answer on the front, and I think that "output resources" is what I want!!

I will try it, thank you!!!

from assetgraph.

sassembla avatar sassembla commented on July 19, 2024

Can AssetGrpah do this thing?

yes, I' ve updated the comment above.

slow

me too. please try it! thank you.

from assetgraph.

oppaikir avatar oppaikir commented on July 19, 2024

Hi, it's me again.
I tried Bundlizer Node's "output resources" setting, but unfortunately, it doesn't worked.
my test project is here : https://db.tt/OHuj4stJ

I had try two kind of asset graph nodes linking,
one is just like above pictures yesterday(as my uploaded test project),
another one is more simply : just one material assetbunle, link to another prefabs assetbundle.
But either of them are failed, I cannot see Dependencies in output manifest file.

Am I still missing something?
Thanks for help.


By the way, I found a Bug? in Bundlizer node:
https://i.imgur.com/37ufSe4.png

when I check "output resources" and first connect to another Bundlizer node,
then connect "bundles" output to BundleBuilder node,
It's ZERO to BundleBuilder node, and all asset & assetbundle output on "resources".

If I link "bundles" output to BundleBuilder node first, then connet from "resources" to another Bundlizer node, it's OK.
assetbundle output to BundleBuilder node by "bundles" output,
and assets output to another Bundlizer node by "resources" output.

from assetgraph.

sassembla avatar sassembla commented on July 19, 2024

OK, I'll check it,

found a Bug

YYYEEEESSS its bug, thank you for information!

from assetgraph.

sassembla avatar sassembla commented on July 19, 2024

so, I made below.

2016-04-16 16 05 26

I've added 2 Prefabricator node before bundlizer.
In these 2 Prefabricator, load Prefab and other sources then attach sources (shader_back, MaterialA) and set it to instantiated Prefab,
then update Prefab itself.

please see "MyPrefabricatorForCube.cs" and "MyPrefabricatorForSphere.cs"
project files are below.
DependencyTest.zip

This is because of these 2 fact, 1:"imported prefabs and source prefab is not same file", and 2:"make relationship between inputted source and prefab on the Graph".

in advance:

and actually,

AssetGraph is mainly designed for "create Mass AssetBundles from most raw resources in rule-based flow".
In this design, the Prefab file is mainly generated inside of AssetGraph for binding datas in desired form with generating resources.

very rough ideal data flow is like below.

pattern A: simply bundlize sources.

"a.png" + "b.fbx" + "c.shader" + "d.material" -> import them -> bundlize

usage: Load raw data from AssetBundle for setting up these datas in runtime.

pattern B: construct prefab with imported sources and bundlize sources.

"a.png" + "b.fbx" + "c.shader" + "d.material" -> import them -> + prefab(combined by new prefab with desired shape) -> bundlize

usage: Load data with prefab from AssetBundle for setting up prefab-binded datas in runtime.

In your case, you can use your own prefab,

and also,

You can generate prefab on the Prefabricator node.

like below.

2016-04-16 17 36 28

project files are below.
DependencyTest2.zip

from assetgraph.

oppaikir avatar oppaikir commented on July 19, 2024

Hi, thanks for answer and the examples, I'll try it.
thanks again for your help!

from assetgraph.

sassembla avatar sassembla commented on July 19, 2024

you're welcome.

from assetgraph.

hiroki-o avatar hiroki-o commented on July 19, 2024

Dependency is now created automatically just like standard asset bundle building. You will just create dependencies within assets (such as, by assigning materials to models) and just configure which asset(s) do you want to put into what bundle(s) - then AssetBundle build pipeline automatically figure out inter asset bundle dependencies and configure properly.

from assetgraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.