お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
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.
CloseOnWillRenderObjectはオブジェクトが表示されている場合カメラごとに1度呼び出されます
この関数はMonoBehaviourが無効である場合は呼び出されません。 この関数はオブジェクトがカリングされレンダリングされる前のカリング処理中に呼び出されます。 適切なコンテキストの使用は Assets->Import Package->Water(Pro Only) の /Water.cs/ スクリプトを参照してください。 Camera.current がオブジェクトをレンダリングするカメラに設定されることに注意してください。
function OnWillRenderObject() { // Tint the object red for identification if it is // being shown on the overhead mini-map view. if (Camera.current.name == "MiniMapcam") { renderer.material.color = Color.red; } else { renderer.material.color = Color.white; } }