Skip to content

Lucy's Tech Dev Blog

  • Home
  • Contact Me
  • About Me

Changing GameObject Material by Script – Unity

March 2, 2021June 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;
Categories Unity Tags GameObject, material, unity
Post navigation
Call Sequence of Class Methods – Unity
Searching String for a phrase – Unity

Recent Posts

  • Running Affinity on the Hololens 2
  • Storybook .stories Quickstart
  • Unreal Quick Tips – Things I always forget
  • React – Step 1 – Installation
  • Website Optimisation Tip: Converting .pngs to .webp

Archives

  • January 2023
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • February 2022
  • December 2021
  • June 2021
  • May 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • June 2020

Categories

  • Animation Blueprint
  • Blog
  • Character Animation
  • Character Blueprint
  • Hololens 2
  • HTML
  • javascript
  • metahuman
  • Mixamo
  • React
  • Storybook
  • Uncategorized
  • Unity
  • Unreal
  • web
© 2025 Lucy's Tech Dev Blog • Built with GeneratePress