Search Unity

Prefabs for PC and Mobile question

Discussion in 'Editor & General Support' started by larswik, Dec 4, 2018.

  1. larswik

    larswik

    Joined:
    Dec 20, 2012
    Posts:
    312
    I am pretty sure the answer to my question is yes, but I want to be 100 percent sure so I am asking. Downloaded an asset from the store tonight. Upon importing it has 2 versions of each asset one saying PC and the other saying mobile. So am guessing that my game, for these assets needs to have an IF statement and ask if the device they are on is a MAC/PC or Android/IOS and link both the PC and Mobile as public variables.

    Is my thinking on this correct?

    Thanks!
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    It depends on the asset.

    If it is a graphical asset (3d model, sprites...) then it probably is a lower poly or lower resolution version of the asset for higher mobile performance, and with these you could use either assuming the game can afford to use the nicer version of the asset and not suffer from performance problems and that either version doesn't need some special shader or something that won't work on mobile.

    If it is code/something else, perhaps it has to change the way things work, what shaders are used, depending on platform, and yes with these you would probably have to only use them on the platform they should be on.
     
  3. larswik

    larswik

    Joined:
    Dec 20, 2012
    Posts:
    312
    Thanks. They are the Realistic Explosions 4, which are particles effects. I have already created an if statement and it seems to work fine and load the correct ones.