Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Edit a prefab for multiple levels

Discussion in 'Scripting' started by AlkaPp, Nov 24, 2018.

  1. AlkaPp

    AlkaPp

    Joined:
    Mar 18, 2014
    Posts:
    1
    Hello,

    I have a prefab that will be placed onto 100s levels. Every level, I want the prefab to show a different number (NOT a random number).

    Instead of using IF level 1, prefab = 2, level 2, prefab = 5, level 3 prefab = 4 (or even using the SWITCH statement) for 100s levels, is there a better way to code it?

    Thank you,

    Alan,