Skip to content

Instantly share code, notes, and snippets.

@LMHPoly
Created July 5, 2018 15:33
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/15349c3bae1e546d0b333e600e970dfa to your computer and use it in GitHub Desktop.
Save LMHPoly/15349c3bae1e546d0b333e600e970dfa to your computer and use it in GitHub Desktop.
EmissionControl.cs (Enable Emission after 3 seconds every frame)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EmissionControl : MonoBehaviour {
public Material material;
void Awake () {
material.DisableKeyword ("_EMISSION");
}
void Update () {
if(Time.time >= 3.0f){
material.EnableKeyword ("_EMISSION");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment