Created
July 21, 2018 03:22
-
-
Save OyamaPenguin/992061ad4e50799f42de889e4f2091db to your computer and use it in GitHub Desktop.
Shaderの円を拡縮する
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 Circle : MonoBehaviour { | |
Renderer _renderer; | |
// Use this for initialization | |
void Start () { | |
_renderer = GetComponent<Renderer>(); | |
} | |
// Update is called once per frame | |
void Update () { | |
float scale = Mathf.PingPong(Time.time/2,0.1f); | |
_renderer.material.SetFloat("Vector1_32F393B5", scale); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment