Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Assetbundles causing missing script reference

Discussion in 'WebGL' started by Diet-Chugg, Feb 24, 2016.

  1. Diet-Chugg

    Diet-Chugg

    Joined:
    Jul 4, 2012
    Posts:
    51
    I'm using the new Unity asset bundle building system.

    I have a build where I use asset bundles and one where I do not use asset bundles.
    In the version that does not use asset it runs as expected and all scripts are found on their proper objects.
    However when I use the Assetbundles I get these warning messages.



    and then those objects act like the script isn't there. But these scripts are on those objects in my scene. It seems to consistently pick the same scripts to not find. The scripts chosen though seem to be at complete random. It doesn't seem to matter if it is a prefab or self standing game objects. Is anyone else running into an issue like this?
     
  2. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    It's possibly code stripping - we had a similar issue; disable stripping in the player settings.
     
  3. Diet-Chugg

    Diet-Chugg

    Joined:
    Jul 4, 2012
    Posts:
    51
    Stripping is disabled. Forgot to mention that.
     
    yuliyF likes this.
  4. Diet-Chugg

    Diet-Chugg

    Joined:
    Jul 4, 2012
    Posts:
    51
    So I'm wondering if it has something to do with exporting an importing packages into the Unity Editor. My content that was already in the project works fine including all the scripts attach that were already in the project. It's the content I imported from another Unity Project that is giving me grief. I've been working in 5.3.0f4 but I also tried it in 5.3.3f1 and the problem is still happening.

    Also I tried it with stripping on and explicitly specifying all missing scripts in the link.xml but the problem persists. In all these test cases the editor log is saying those "missing" scripts are being included in the build. It's like the asset bundles fail to find a match somehow and leaves them as Missing script references instead. I've taken a look at the WebGL manifest and the scene manifest and compared the GUIDs to the ones in the manifest. They all find a match with an associated 11500000 fileID and are of Class 114
     
  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Which scripts are missing? how can u tell ?
     
  6. Diet-Chugg

    Diet-Chugg

    Joined:
    Jul 4, 2012
    Posts:
    51
    This issue has been fixed. I tried using Unity's asset bundle manager and it worked.
     
  7. Marikosama

    Marikosama

    Joined:
    Jun 26, 2015
    Posts:
    13
    Diet Chugg Can I know how do you solve it? Not much solution on the internet
     
  8. Diet-Chugg

    Diet-Chugg

    Joined:
    Jul 4, 2012
    Posts:
    51
  9. Deleted User

    Deleted User

    Guest

    I had this problem and i realized that it's problem is with assets GUID
    So I used re import all option right from root directory of unity project. and it worked.
    I really hope that this solves your problem.