- Home /
Question by
ehsan_wwe1 · May 01, 2014 at 11:13 AM ·
material.public strings
How to solve Unity3d 4.2 problem with material(if you call it at script ...)
Hi i Update my unity3d to 4.2 and i see a unusaly problem if you call or use Renderer.material at your script your Object material change to Instance of orginal material;
i want when i change option of my material (like older version)it work on Whole material (every material with name of body)
see my Photo :D i take screen shot before play after play
my code >
using UnityEngine;
using System.Collections;
public class body_alpha : MonoBehaviour {
Public Material mymat;
void Update()
{
mymat = renderer.material;
}
}
befor_play.jpg
(79.5 kB)
after_play.jpg
(75.0 kB)
Comment
Best Answer
Answer by ehsan_wwe1 · May 01, 2014 at 11:57 AM
I found it we can Use Sharedmaterial at new version of unity3d
Your answer
