Last active
March 5, 2020 03:22
-
-
Save IshidaGames/e33809b6e3ed1feb7a286e7152cf37a0 to your computer and use it in GitHub Desktop.
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 Change : MonoBehaviour { | |
void Start () { | |
//アタッチするオブジェクトのRendererのComponentを取得する | |
Renderer coloring = this.GetComponent<Renderer>(); | |
//RendererのMaterialにランダムな色を入れる | |
coloring.material.color = new Color(Random.value, Random.value, Random.value, 1.0f); ; | |
} | |
void Update () { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment