Search Unity

Question Creating a new layer when an asset bundle is installed

Discussion in 'Asset Bundles' started by uglymug, Nov 26, 2021.

  1. uglymug

    uglymug

    Joined:
    Jul 14, 2016
    Posts:
    6
    Hi,

    I have a package that I want to sell on the Unity Asset store. It needs to have a specific layer in order to work. I have purchased other third party assets from the store and i remember one or 2 of them had a pop up window stating the asset needed to add the following layers, click OK and they were created automatically.

    I cannot find anywhere to do this any help please?

    For info I know I can do these:

    1. Export the project as a complete project, this is overkill and I wouldn't want to overwrite any of my customers settings.
    2. Seems its impossible to set layers at runtime.
    3. I could write an editor side script and just get the users to run it, but this seems an extra step i shouldn't need to ask my customers to do.
    4. Rely on the documentation to tell the user to do it.

    And the point is, I've seen other assets create the layers at import (unfortunately I have 400+ assets and cant find the ones that did it!)

    thanks in advance