跳到主要內容

發表文章

目前顯示的是 6月, 2024的文章

Unity 中獲取 TextMesh Pro

 Unity 中獲取 TextMesh Pro, 點 Unity.Editor.asmdef 進行編輯 搜索 TextMsh Pro 加入, 滑到下方點 Apply 套用 切換到 Editor 腳本 using TMPro; //get transform.Find("Text_ID").GetComponent<TextMeshPro>().text = "123";

StackOverflowException: The requested operation caused a stack overflow.

今天打包版本測試轟炸超人發現這個問題 StackOverflowException: The requested operation caused a stack overflow. at (wrapper managed-to-native) System.String.FastAllocateString(int) at System.String.CreateStringFromEncoding (System.Byte* bytes, System.Int32 byteLength, System.Text.Encoding encoding) [0x00013] in <c9d3ffd4b98649ee9989e1908eaca019>:0 at System.Text.Encoding.GetString (System.Byte* bytes, System.Int32 byteCount) [0x00033] in <c9d3ffd4b98649ee9989e1908eaca019>:0 at System.Text.Encoding.GetString (System.ReadOnlySpan`1[T] bytes) [0x00013] in <c9d3ffd4b98649ee9989e1908eaca019>:0 at System.String.Ctor (System.SByte* value, System.Int32 startIndex, System.Int32 length, System.Text.Encoding enc) [0x0006d] in <c9d3ffd4b98649ee9989e1908eaca019>:0 at System.String.CreateString (System.SByte* value, System.Int32 startIndex, System.Int32 length, System.Text.Encoding enc) [0x00000] in <c9d3ffd4b98649ee9989e1908eaca019>:0 at (wrapper managed-to-managed) Sys...

external scene object "Canvas" can not be saved in prefab asset.

 今 天把 scene 底 下的介面給整理到 prefab 去, 結果出現這個錯誤 Reference "0" of "Panel_ThreeTiledGame" to external scene object "Canvas" can not be saved in prefab asset. at D:\ProgramFiles(x86)\CocosCreator_2.3.3\resources\app.asar\editor\page\scene-utils\utils\prefab.js:1:3280 at n (D:\ProgramFiles(x86)\CocosCreator_2.3.3\resources\app.asar\editor\page\scene-utils\utils\prefab.js:1:2960) 後來發現是複製過來的Button Event 上面還掛著原本的 canvas 綁定, 把這個去掉在保存就好了