Search Unity

AssetBundle Graph Tool 1.0 Release

Discussion in 'Asset Bundles' started by hiroki-unity, Oct 21, 2016.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Just started using this tool. Please check out my PRs in the Bitbucket repo. and expect more to come
     
  2. jamesrm

    jamesrm

    Joined:
    Aug 15, 2015
    Posts:
    1
    Hi,

    I was looking at this today and the first use case I thought of was automatically generating Hi/Med/Low asset bundle variants for my textures. I have attached a picture of the graph I created.

    When I run build, I get an error:

    "Assets/ThirdParty/UnityEngine.AssetBundleGraph\Cache\GeneratedAssets/64bb6afc-ba19-4169-9db7-cb887bc5bf89/Android/054b2599-c041-4b12-9795-05f03bfa61e2/Player_Image.png" has been marked into more than one AssetBundles.

    Am I doing something wrong?
     

    Attached Files:

  3. ando-kal

    ando-kal

    Joined:
    Feb 23, 2015
    Posts:
    3
    HI
    Im trying to get this tool working in 2017.1. Im still not sure how to get it into one of my projects. How do i install it?If i import the unitypackages i found, Examples being one of them, gets me an error:
    Assets/AssetGraph-Examples/Editor/CreateMaterialFromTexture.cs(8,19): error CS0234: The type or namespace name `AssetGraph' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?

    I also want to be able to remove the Examples from my own project and leave the code that will work with ABBrowser and my project.

    Any help would be greatly appreciated.

    Thanks!
    Andy
     
  4. ando-kal

    ando-kal

    Joined:
    Feb 23, 2015
    Posts:
    3

    OK - so i figured this out: Just copy the folder from the downloaded zip into the project by drag and drop, no import necessary. I deleted the Examples folder for now. Just starting with an empty project, added the AssetBundlesBriowser from the Asset Store, then copied in the UnityEngine.AssetGraph folder from download into

    Still seeing some errors:
    Assets/AssdetGraph/UnityEngine.AssetGraph/Editor/System/AssetGenerators/CreateMaterialFromTexture.cs(12,14): error CS0535: `CreateMaterialFromTexture' does not implement interface member `UnityEngine.AssetGraph.IAssetGenerator.OnValidate()'
    Assets/AssdetGraph/UnityEngine.AssetGraph/Editor/System/AssetGenerators/CreateMaterialFromTexture.cs(12,14): error CS0535: `CreateMaterialFromTexture' does not implement interface member `UnityEngine.AssetGraph.IAssetGenerator.CanGenerateAsset(UnityEngine.AssetGraph.AssetReference)'
    Assets/AssdetGraph/UnityEngine.AssetGraph/Editor/System/AssetGenerators/DuplicateRefererenceAsset.cs(12,14): error CS0535: `DuplicateReferenceAsset' does not implement interface member `UnityEngine.AssetGraph.IAssetGenerator.OnValidate()'
    Assets/AssdetGraph/UnityEngine.AssetGraph/Editor/System/AssetGenerators/DuplicateRefererenceAsset.cs(12,14): error CS0535: `DuplicateReferenceAsset' does not implement interface member `UnityEngine.AssetGraph.IAssetGenerator.CanGenerateAsset(UnityEngine.AssetGraph.AssetReference)'
    Assets/AssdetGraph/UnityEngine.AssetGraph/Editor/System/Modifiers/SetSpritesToAnimation.cs(11,14): error CS0535: `SetSpritesToAnimation' does not implement interface member `UnityEngine.AssetGraph.IModifier.OnValidate()'
     
  5. ando-kal

    ando-kal

    Joined:
    Feb 23, 2015
    Posts:
    3

    OK: I deleted and re-imported everything in a fresh project:
    1. Get latest AssetBundleBrowser from AssetStore. Import it.
    2. Created folder Assets/AssetGraph in my new project.
    3. Downloaded ABGT source from here:
    https://bitbucket.org/Unity-Technologies/assetbundlegraphtool/downloads/
    4. Selected and Drag&Dropped everything from under Unity-Technologies-assetbundlegraphtool-7247bc7b7b8c/ into my project: Assets/AssetGraph/
    5. Created a folder: Assets/AssetGraph/Graphs/
    6. Created new Graph as in video here:

    7. Following the youtube video with no errors this time.

    Andy
     
  6. hiroki-unity

    hiroki-unity

    Joined:
    Jun 20, 2013
    Posts:
    21
    @ando-kal Thank you for trying out. The compilation errors below is has accidentally introduced to the release branch - it is fixed now.


     
  7. Lemonua

    Lemonua

    Joined:
    Mar 16, 2017
    Posts:
    7
    Hi. A want to make project with asset bundles containing only:
    a) scenes
    b) prefabs
    c) materials
    d) sprites and atlases
    Problem is that AssetGraph puts all dependencies into created asset bundles. For example, asset bundle named 'mats' in preview mode was 8.2KB, size after build became 68MB because of included sprites.
    Same goes with 'prefabs' asset bundle.
    Extract Shared Assets doesn't work - node creates shared_0 bundle which contains duplicate of sprite folder and shared_1 bundle with some materials. And builder won't run:
    Asset "Assets/Res/Back.png" has been assigned to more than one Asset Bundle.
    UnityEditor.EditorApplication:Internal_CallDelayFunctions()
    And i can't use 'Extract Shared Assets' bexause it possibly can destroy my Sprite Atlas - if one sprite come to one shared bundle and another sprite - to second bundlem etc.

    So, is there a way to cut dependencies and build asset bundles with only files inside the group node?
     

    Attached Files: