Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice

[BUG]The new assetbundle in 5.x can not keep reference to script when it change name.

Discussion in '5.1 Beta' started by watsonsong, May 23, 2015.

  1. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    Right now(until 5.1.0f2), When I make a prefab and attach my script, and build AssetBundle using the new bundle system introduce in Unity5.
    I load the prefab from the bundle, instanicate it, the script is attach to it.
    When I change the MonoBehavior subclass name(include name or namespace) attach to the prefab, and rebuild the asset bundle, the script reference is missing.
    Right now I need remove the script from the prefab, and re-add it, the prefab in the bundle is OK again.

    I need carefully check, and avoid no not modify class name , but it really a hard work.

    I check the prefab file, when I reattach the script, only the fileID changed.

    Maybe the script reference in the AssetBundle can be more smart, and make it more useful.
     
    lermy3d likes this.
  2. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    BTW, I met this bug on MacOS
     
  3. Alex-Lian

    Alex-Lian

    Guest

    Is this a 5.1 specific bug? It used to work before?

    Either way, could you please submit a proper bug report with clear repro steps and come back with that number so we can look into it? (and better yet if you can tell us if it's 5.1 specific or not)
     
  4. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    I had submit this BUG but seems no response. This bug happen on each 5.x version include 5.0 and 5.1.
    I am using MacOS and simply download this demo:
    http://files.unity3d.com/vincent/assetbundle-demo/users_assetbundle-demo.zip

    Create a new script, and attach it to the cube prefab, unmark the "Simulate AssetBundles", and build asset bundle, and run AssetLoader scene, everything is OK.
    And the I change the script class name, or add an namespace, then delete all asset bundles folder and rebuild them. But when run the AssetLoader scene, the script is missing.
    I remove the script from the cube prefab, and re-attach it, and rebuild the AssetBundles, It work fine again.
     
  5. Alex-Lian

    Alex-Lian

    Guest

    Could you please provide the bug number? We have many submissions and giving us a specific number to look at makes this easier to find.

    However, in explaining this is since 5.0, this is not the appropriate place for this thread. This forum is for 5.1 specific issues, feedback and discussion.
     
  6. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
  7. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    Is it a bug or I miss something?
    I met this problem and can not fix it more than a week.
    Can you help me out?
     
  8. Alex-Lian

    Alex-Lian

    Guest

    I had an engineer look and there's agreement that it's a bug. It is being investigated.
     
  9. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    What new about this bug?
    I see the newest patch version: 5.0.2p4 still no mention about it.
     
    lermy3d likes this.
  10. Alex-Lian

    Alex-Lian

    Guest

    When it will be addressed is difficult to specify, but we appreciate you reporting the bug and it is in our bug list.