Skip to content

Instantly share code, notes, and snippets.

@LMHPoly
Created July 5, 2018 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LMHPoly/b0d44b23533cf8d1059cfd5a01b0ad7e to your computer and use it in GitHub Desktop.
Save LMHPoly/b0d44b23533cf8d1059cfd5a01b0ad7e to your computer and use it in GitHub Desktop.
EmissionControl.cs FIXED (Enable Emission one time after 3 seconds)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EmissionControl : MonoBehaviour {
public Material material;
void Awake () {
material.DisableKeyword ("_EMISSION");
}
void Start(){
StartCoroutine (EnableAfterTime());
}
IEnumerator EnableAfterTime(){
yield return new WaitForSeconds (3);
material.EnableKeyword ("_EMISSION");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment