• About Me
  • Contact Me
  • Blog

Lucys Unity Dev Blog

Changing GameObject Material by Script

Posted on June 23, 2020June 23, 2020 by Lucy Estela

Basically you just need to access the material property of the Renderer component.

public Material yourMaterial;

gameobject.GetComponent<Renderer> ().material = yourMaterial;
Posted in Uncategorized

Post navigation

← Call Sequence of Class Methods
Searching String for a phrase →

Recent Posts

  • Sideloading onto your Hololens 2 through the Device Portal
  • From Unity to Hololens
  • Toggle GameObject Visibility
  • Dictation Recognizer
  • Searching String for a phrase

Archives

  • December 2020
  • October 2020
  • June 2020

Categories

  • Blog
  • Uncategorized
Powered By DreamHost