Search Unity

How to prevent to create new extra Prefabs?

Discussion in 'Scripting' started by mahdiii, Feb 17, 2018.

  1. mahdiii

    mahdiii

    Joined:
    Oct 30, 2014
    Posts:
    856
    Hi
    I have used sprite renderers with 2D colliders for items in a 2d game. The game can let users to make their levels.
    So I have used UI unity to let players to make levels,(Add, remove or reorder items on the road)
    My question is that I have created prefabs for every item in the game play (They have sprite renderer and colliders) but I need them in level designing. If I use UI unity, I have to create new prefabs for all items (they have UI images). So I can add scrollRect and Mask and users can scroll it, add, remove, etc and create levels
    I can to not use UI unity and instead can apply spriterenderers like before but here I need spritemask and custom scrollRect to shift the land. Therefore if I would like to not create new prefabs and want to use previous prefabs, I have to set some properties like Visible Inside Mask for all items in a script
    Is there a better way to avoid to create other prefabs?