Material.GetFloat 获取浮点数

function GetFloat (propertyName : string) : float

Description描述

Get a named float value.

获取一个命名的浮点数

参见: SetFloat , Materials

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		renderer.material.shader = Shader.Find(" Glossy");
		print(renderer.material.GetFloat("_Shininess"));
	}
}
function Start() {
	renderer.material.shader = Shader.Find (" Glossy");
	print(renderer.material.GetFloat("_Shininess"));
}
Page last updated: 2011-1-22