Quantcast
Channel: Cannot modify a value type return value of `UnityEngine.Material.color' for changing alpha of gameobject - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by umirza47 for Cannot modify a value type return value of...

Color is a struct and it is valueType.go.material.color // it will return a copy of ColorYou have to make another instance of Color then assign back to go.material.colorgo.material.color = new...

View Article



Cannot modify a value type return value of `UnityEngine.Material.color' for...

I'm having trouble with this, although this is just for improvement for my code I can make the gameobject change it's alpha I just want it simpler.here is my code:SpriteRenderer go;Color colora;float x...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images