赞
踩
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Change_Color : MonoBehaviour {
void Start() {
GameObject Cube = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
Cube.GetComponent<Renderer>().material.color = new Color(1,0,0); // 重点是这一句
}
void Update() {
}
}
参考:https://blog.csdn.net/weixin_44345862/article/details/122115404
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。