Search Unity

Finding Prefab children

Discussion in 'Scripting' started by joshcamas, Jan 18, 2019.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,278
    Is there a way of finding all prefab assets that are based on a specific prefab, without having to go through every single prefab in the library? The latter solution is an **okay** solution, since I wouldn't be scanning often, but of course if possible I'd rather have something faster if it exists :3
     
  2. beanie4now

    beanie4now

    Joined:
    Apr 22, 2018
    Posts:
    311
    Save all the instances to a list on instantiation.
     
  3. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,278
    I simply scan all assets, it works fine enough :3