LoginSignup
0
0

More than 5 years have passed since last update.

scriptからマテリアルの色、発光を変える。

Last updated at Posted at 2019-01-07

scriptからマテリアルの色、発光を変える。
http://dnasoftwares.hatenablog.com/entry/2015/03/19/100108

leftHandObj.GetComponent<Renderer>().material.SetColor("_EmissionColor", Color.yellow);

だけで動かないなーと思っていたが、
leftHandObj.GetComponent<Renderer>().material.EnableKeyword("_EMISSION")

も必要ということが分かった!

leftHandObj.GetComponent<Renderer>().material.SetColor("_EmissionColor", Color.clear);

これで発光をオフに

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0