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. Dismiss Notice

Question Can Asset Bundle contain exiting application scripts ?

Discussion in 'Asset Bundles' started by osgseb, Sep 19, 2023.

  1. osgseb

    osgseb

    Joined:
    Jan 17, 2022
    Posts:
    22
    Hello,

    I know an Asset Bundle can't contain script that are not already in the application, but is it possible to have a prefab with scripts that are already build in the application ?

    Thanks
     
  2. George-Ing

    George-Ing

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    68
    Hey!

    What do you mean by "scripts that are already built"? Do you mean "can you attach MonoBehaviour components to GameObjects, and then ship those GameObjects in the bundle"? If so, then the answer is yes. But you're correct that you can't add scripts directly, or new scripts that aren't a part of the base application.
     
    osgseb likes this.