Which is better performance-wise?

Hi guys,

If I have a sprite renderer and I want it to disappear.

Which way would be better performance-wise?

  1. Deactivating the gameObject

  2. Disabling Setting sprite renderer

  3. Making sprite renderer’s alpha 0

Those sprite’s don’t have any colliders or scripts so I don’t care about interactivity etc. I’m asking because I vaguely remember someone stating that setting gameObject as active/inactive is not good for performance but I can’t search for this info, that’s why I’m asking here.

As a bonus to your answer, could you also point me to the place where I could find out similar information? Unity’s manual is not a very good source for that and when I need to know what’s the most optimal way to go, I have no answer (unless I already learned it somehow by asking around).

Thanks a bunch!

float prcent = \ ransparence, value must be between 0 and 1 … (min/max) = ?
\ (20 / 60) = 0.3

GetComponent<SpriteRenderer>().color = new Color(prcent, prcent, prcent, 1);