• About Me
  • Contact Me
  • Blog

Lucys Tech Dev Blog

Tag: material

Changing GameObject Material by Script – Unity

Posted on June 23, 2020March 2, 2021 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 UnityTagged GameObject, material, unity

Recent Posts

  • Unreal and Hololens – Step 7 Making your scene interactive
  • Unreal and Hololens – Step 6 Set Up for Mixed Reality
  • Unreal and Hololens – Step 5 Create a Level
  • Unreal and Hololens – Step 4 Project Settings
  • Unreal and the Hololens 2 – Step 2 File Setup

Archives

  • March 2021
  • February 2021
  • December 2020
  • October 2020
  • June 2020

Categories

  • Blog
  • Hololens 2
  • Unity
  • Unreal
Powered By DreamHost