土屋つかさの技術ブログは今か無しか

土屋つかさが主にプログラミングについて語るブログです。

#unity Renderer.lightmapScaleOffsetプロパティ私訳

Renderer.lightmapScaleOffsetプロパティのについて正確な情報が必要になり、ドキュメントを訳出しました。2018.3版だと部分的に公式訳がなくなっていたので、欠落分を2017.3版から取得しています。

原文:https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Renderer-lightmapScaleOffset.html
公式訳:https://docs.unity3d.com/ja/2018.3/ScriptReference/Renderer-lightmapScaleOffset.html
公式訳(2017.3):https://docs.unity3d.com/ja/2017.3/ScriptReference/Renderer-lightmapScaleOffset.html

 しかしこのスクリプトリファレンスについては英語版と日本語版でURLパス構造が変わってる(英語版はDocumentationディレクトリが挟まってる)為に、UIで言語切り替えられないの、なんとかならんのかな……

Renderer.lightmapScaleOffset

原文:The UV scale & offset used for a lightmap.
公式訳:UV スケールとオフセットをライトマップに使用します。
私訳:ライトマップに適用するUV(座標)のスケールとオフセットです(※土屋注:シェーダーでテクスチャに適用するscale&offsetと同じ)。

原文:A lightmap is a texture atlas and multiple Renderers can use different portions of the same lightmap.
公式訳:ライトマップはテクスチャアトラスであり、複数のレンダラーが同じライトマップの異なる部分を使用できます。

原文:The vector's x and y refer to UV scale, while z and w refer to UV offset.
公式訳:z と w が UV オフセットを参照している間、ベクトルの x と y は UV スケールを参照してください。
私訳:ベクトルのxとyはUVスケール、zとwはUVオフセットを示します。

原文:Note: this property is only serialized when building the player.
公式訳(2017.3):注意: このプロパティーはプレイヤーをビルドするときのみにシリアライズされます。
私訳:注意:このプロパティはplayerをビルドした時点でのみシリアライズされます。

原文:In all the other cases it's the responsibility of the Unity lightmapping system (or a custom script that brings external lightmapping data) to set it when the Scene loads or playmode is entered.
公式訳(2017.3):それ以外のすべての場合は、シーンが読み込まれるとき、または、プレイモードに入るときに、Unity のライトマップ (または、外部のライトマップデータを取り込むカスタムスクリプト) によって処理されます..。
私訳:それ以外の全ての場合は、シーンが読み込まれた時、あるいはプレイモードに入る時に、Unityのライトマッピングシステム(あるいは、外部のライトマップデータ(※1)を読み込むカスタムのスクリプト)が反応して設定します。

※1 土屋注:具体的になにを指すのかよくわからない。独自のライトマップテクスチャを設定する方法なんてあるのかな?

余談

 ところで、公式訳は2018.3では"Note:"以降が訳出されていません。恐らく、システム上の仕様で、英語版のテキストが更新されると、翻訳の必要ありとみなして一時的に翻訳テキストが取り下げられるのだと思います。そこで、以前の版とどこが更新されているか確認してみました。

公式訳(2018.3):Note: this property is only serialized when building the player. In all the other cases it's the responsibility of the Unity lightmapping system (or a custom script that brings external lightmapping data) to set it when the Scene loads or playmode is entered.

公式訳(2017.3):Note: this property is only serialized when building the player. In all the other cases it's the responsibility of the Unity lightmapping system (or a custom script that brings external lightmapping data) to set it when the scene loads or playmode is entered.

これ、更新箇所がお分かりになるでしょうか? 最後の部分で「scene」の頭文字が大文字になっています(!)。うーん、これで翻訳テキストが取り下げられるのがちょっとひどいなあ(本当にそれが原因なのかはわかりませんが)。これは日本スタッフは悪くない。本国のドキュメント運用ポリシーの問題だと思います。

[asin:4862464130:detail]