Mesh Swap vs Run-time Material Change..

Helloz

Im working on an IOS game, and wanted to ask about optimisation.

The Simple scenario is:

I have many Red textured balls (Prefabs) and when i tap one, that one turns into a Yellow textured ball.

I know of 4 options to do this:

  1. Material Changing via Renderer.material

  2. Instancing a new Yellow Mesh, and change the mesh

  3. 2 Objects parented an empty game object… Hide one, show the other…

  4. An object with 2 UV sets? And just switch UV mapping coordinates… (have only read about it)

Question:
Would like to ask if anyone knows what would be the FASTEST processing/ least memorage method of implementing this mechanic for mobile. Or what is your preferred way of doing it …?

Thanks!!!

FWIW

solution (3) is the totally ordinary solution you would see in millions of video game projects.

performance concerns are totally irrelevant here. to be honest (just as a scientific question) I doubt there’d even be an answer to “what is more performant” – they all use “no” horsepower and it would depend entirely on the game you are doing, the particular details. other issues like culling, phsyics etc. would utterly, utterly swamp the trivial performance issues involved.

(If you are doing some sort of UNUSUAL PROJECT – ie you 'forgot to mention" you have 18 million balls, or 82,000 colors, or you must change colors every millionth of a second, or whatever … then that is a separate specific question.)

Honestly the answer is just “3 … get on with it”. It’s that simple. Performance is totally irrelevant in this question on mobile.

Suggest you CLOSE OUT (tick any answer) this question and move on to a new specific questions if you have one