I am trying to make a script that will allow me to automatically import images into unity, and then display them on a screen. The problem is, I can only seem to manage to edit the “MainTex”, and not the “Emission Texture”. This is really necessary trying to create a nice realistic screen-vibe.
I am using this line for editing the maintex:
GetComponent.<Renderer>().material.SetTexture("_MainTex", Texture);
And when I am editing the emission texture:
GetComponent.<Renderer>().material.SetTexture("_EmissionTex", Texture);
Now when I play my script I can see that the non-emission part (darker in the background) changes, but the emission is still the old texture. I get no warnings/error messages whilst doing this. I have been trying to fix this for quite a while now and I am really stuck. Help is very much appreciated!