Search Unity

How to set several prefabs in a public list at the same time

Discussion in 'Scripting' started by Swirtnox, Mar 21, 2019.

  1. Swirtnox

    Swirtnox

    Joined:
    Nov 10, 2016
    Posts:
    3
    Can I set several elements in a public list in one time ? Because dragging each elements one by one is too long when you have a long list.
     

    Attached Files:

  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    Yeah. You can lock your inspector, select all of the objects, and then drag them onto the "Question" label. That'll add all of them to the list.

    You need to lock the inspector as otherwise you'll get the inspector for the objects you select.
     
    Joe-Censored and Doug_B like this.
  3. Swirtnox

    Swirtnox

    Joined:
    Nov 10, 2016
    Posts:
    3
    Thank you so much, it works fine :)