言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

SystemInfo.graphicsShaderLevel

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static var graphicsShaderLevel: int;
public static int graphicsShaderLevel;
public static graphicsShaderLevel as int

Description

グラフィックデバイスのシェーダーの性能レベル (Read Only)

This is approximate "shader capability" level of the graphics device, expressed in DirectX shader model terms. Possible values are: 50 シェーダーモデル 5.0 (DX11.0) 41 シェーダーモデル 4.1 (DX10.1) 40 シェーダーモデル 4.0 (DX10.0) 30 シェーダーモデル 3.0 20 シェーダーモデル 2.x See Also: SystemInfo.graphicsPixelFillrate

	// Check for shader model 3.0 or better support

	if (SystemInfo.graphicsShaderLevel >= 30)
		print ("Woohoo, decent shaders supported!");
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Example() {
        if (SystemInfo.graphicsShaderLevel >= 30)
            print("Woohoo, decent shaders supported!");
        
    }
}
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def Example() as void:
		if SystemInfo.graphicsShaderLevel >= 30:
			print('Woohoo, decent shaders supported!')