[過去ログ]
【3Dゲームエンジン】Unity質問スレッド29 [無断転載禁止]©2ch.net (1002レス)
【3Dゲームエンジン】Unity質問スレッド29 [無断転載禁止]©2ch.net http://mevius.5ch.net/test/read.cgi/gamedev/1495286462/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
269: 名前は開発中のものです。 [sage] 2017/06/12(月) 13:06:26.65 ID:BIdO4+Rx uguiで一文字づつ表示するのにsubstringを使って表示させ、 個別に色文字を使うのに文字に含まれるHTMLを文字として表示しないように、 一文字づつ判定させて飛ばしてるんですがなにか効率のいい方法ないでしょうか すごく汚いコードでお恥ずかしいんですが、アドバイスいただけたら嬉しいです。 public Text Comment; //UIに表示する文字 IEnumerator UpdateTextCoroutine(string text) { int counter = 0; string tag = ""; while (counter <= text.Length) { if (text.Substring(0,counter).EndsWith("<")) { while (!text.Substring(0, counter).EndsWith(">")) { counter++; } tag = "</color>"; } else { if (text.Substring(0, counter).Contains(tag)) tag = ""; Comment.text = text.Substring(0, counter)+ tag; counter++; } yield return new WaitForSeconds(Interval); } } http://mevius.5ch.net/test/read.cgi/gamedev/1495286462/269
272: 名前は開発中のものです。 [sage] 2017/06/12(月) 19:04:25.26 ID:BIdO4+Rx >>271 ありがとうございます!うまくいきました 勉強になります http://mevius.5ch.net/test/read.cgi/gamedev/1495286462/272
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.053s