Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Dissolve Shader

$
0
0
I am currently trying to conrol the dissolve speed on the shader through an activated script on the same object, but i cannot seem to alter the code so that it does not loop:

Code (csharp):
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Timed : MonoBehaviour
  5. {
  6.   public float m_fDestruktionSpeed = 0.1f;
  7.   public Material m_Mat;
  8.   public float m_fTime;
  9.  
  10.    void Start () {
  11.   m_Mat = renderer.material;
  12.    }
  13.  
  14.    void Update () {
  15.   m_fTime += Time.deltaTime * m_fDestruktionSpeed;
  16.   if (m_fTime >=...
Dissolve Shader

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>