Created
March 12, 2013 12:42
-
-
Save splhack/5142581 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| csharp/unity/renderer/common/lwf_unity_text.cs TextRenderer | |
| TextRendererコンストラクタでGameObjectを生成しMeshFilter, MeshRendererをAddComponentする。 | |
| TextContext中のBitmapFontRendererインスタンスからmeshとmaterialをそれぞれsharedMesh,sharedMaterialに代入。 | |
| TextRenderer.Renderで、渡ってきたMatrix,ColorTransformを、このGameObjectに反映させる。 | |
| これらのGameObjectは、親のLWFObjectよりもZ的に手前になるように配置する(Unityに連続でテキストを描画させ、dynamic batchingされるようにするため)。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ご丁寧にありがとうございます!おかげさまで謎が解けました!
m_renderMatrixを作成したGameObjectにどう設定するのかばかり考えていました。
Render()引数のMatrixには行列変換前のパラメータが入っていたのですね・・・
後はGameObjectのactive切替を適切な場所で行えば大丈夫そうです。
本当にありがとうございました!