-
-
Save LMHPoly/b0d44b23533cf8d1059cfd5a01b0ad7e to your computer and use it in GitHub Desktop.
EmissionControl.cs FIXED (Enable Emission one time after 3 seconds)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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