I am changing the material at run-time of a spritemanager when changing levels of our game.
I noticed I could change either .material or .renderer.material. Is there a preferred or proper method? They both seem to work.
smBackground.material.mainTexture = (Texture)Resources.Load(sPrefix + iLevel);
or
smBackground.renderer.material.mainTexture = (Texture)Resources.Load(sPrefix + iLevel);