SpriteManager material

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);

bump… been fighting some other crash issues, so I would appreciate if anyone knows if there is a proper way here to avoid future issue, thanks.

I also would really like to know the best method for changing SpriteManager’s material dynamically.