Skip to content

Instantly share code, notes, and snippets.

@OyamaPenguin
Created July 21, 2018 03:22
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 OyamaPenguin/992061ad4e50799f42de889e4f2091db to your computer and use it in GitHub Desktop.
Save OyamaPenguin/992061ad4e50799f42de889e4f2091db to your computer and use it in GitHub Desktop.
Shaderの円を拡縮する
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