お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
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モデルがインポートされたときの読み取り/書き込みの有効ステータス
スクリプトから作成されたダイナミックメッシュの場合、常に true を返します。 読み取り可能でないメッシュの場合実行時に任意のデータ配列をアクセスする際にエラーがスローされます。 Unity エディタの中で、ゲーム外およびレンダリング ループの中でアクセスが許可されます。
function Start () { var mesh : Mesh = GetComponent(MeshFilter).sharedMesh; print(mesh.isReadable); }
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Start() { Mesh mesh = GetComponent<MeshFilter>().sharedMesh; print(mesh.isReadable); } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def Start() as void: mesh as Mesh = GetComponent[of MeshFilter]().sharedMesh print(mesh.isReadable)