Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice

Missing scripts on gameObject created from asset bundle

Discussion in 'Editor & General Support' started by voldemarz, Jan 30, 2013.

  1. voldemarz


    Sep 19, 2011
    I have a prefab with 2 scripts A and B attached to it. The prefab is packaged into an asset bundle and streamed from server if needed.

    The problem is that when game object from the asset bundle is instantiated only the script A is present with all the right settings (public field values), but script B is missing.

    The problem is present in Web Player, but in the Editor everything is fine. Any idea why? Isn't it supposed to work?

    I know that you can't package scripts in asset bundles and expect them to work, need to load them manually using Reflection.