I can change emission brigthness in play mode, but not in windows standalone player:
using UnityEngine;
using System.Collections;
public class Load : MonoBehaviour
{
private int brojac;
private GameObject clone;
private bool kontrola;
private Material mat;
private Renderer rend;
public GameObject[] tileObjects;
void Start ()
{
brojac = 0;
kontrola = true;
}
void Update ()
{
if (Input.GetMouseButtonDown (0) && kontrola) {
load_model ();
}
if (clone != null && !kontrola) {
if (Input.GetMouseButtonDown (1)) {
Destroy ();
}
if (Input.GetKey ("k")) {
rend.material.SetColor ("_EmissionColor", Color.red * 1.5f);
//DynamicGI.SetEmissive (rend, Color.red);
DynamicGI.UpdateMaterials (rend);
}
if (Input.GetKey ("l")) {
rend.material.SetColor ("_EmissionColor", Color.black);
//DynamicGI.SetEmissive (rend, Color.black);
DynamicGI.UpdateMaterials (rend);
}
}
}
void load_model ()
{
clone = Instantiate (tileObjects [brojac], new Vector3 (0, 0, 0), Quaternion.identity) as GameObject;
clone.name = "Lamp";
rend = clone.GetComponent<Renderer> ();
rend.material.EnableKeyword ("_EMISSION");
kontrola = false;
}
void Destroy ()
{
Destroy (clone, 0.5f);
brojac++;
if (brojac == 15)
brojac = 0;
kontrola = true;
}
}