UnityAssetQuickAccessTool icon indicating copy to clipboard operation
UnityAssetQuickAccessTool copied to clipboard

Unity 6000.0.14f1中,项目名称中含有汉字时,无法显示项目名称,并且Console输出异常 `UnityException: get_bytes can only be called from the main thread.`

Open SolarianZ opened this issue 1 year ago • 1 comments

Unity 6000.0.14f1中,项目名称中含有汉字时,无法显示项目名称,并且Console输出异常日志:

UnityException: get_bytes can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
UnityEngine.TextAsset.get_bytes () (at <eb019d4a63d44ca7a73547c38156dec2>:0)
UnityEngine.TextAsset.get_text () (at <eb019d4a63d44ca7a73547c38156dec2>:0)
UnityEngine.TextCore.Text.UnicodeLineBreakingRules.GetCharacters (UnityEngine.TextAsset file) (at <fb6030ab83b0456183d6f22ad21716e1>:0)
UnityEngine.TextCore.Text.UnicodeLineBreakingRules.LoadLineBreakingRules () (at <fb6030ab83b0456183d6f22ad21716e1>:0)
UnityEngine.TextCore.Text.UnicodeLineBreakingRules.get_leadingCharactersLookup () (at <fb6030ab83b0456183d6f22ad21716e1>:0)
UnityEngine.TextCore.Text.TextGenerator.ParsingPhase (UnityEngine.TextCore.Text.TextInfo textInfo, UnityEngine.TextCore.Text.TextGenerationSettings generationSettings, System.UInt32& charCode, System.Single& maxVisibleDescender) (at <fb6030ab83b0456183d6f22ad21716e1>:0)
UnityEngine.TextCore.Text.TextGenerator.GenerateTextMesh (UnityEngine.TextCore.Text.TextGenerationSettings generationSettings, UnityEngine.TextCore.Text.TextInfo textInfo) (at <fb6030ab83b0456183d6f22ad21716e1>:0)
UnityEngine.TextCore.Text.TextGenerator.GenerateText (UnityEngine.TextCore.Text.TextGenerationSettings settings, UnityEngine.TextCore.Text.TextInfo textInfo) (at <fb6030ab83b0456183d6f22ad21716e1>:0)
UnityEngine.TextCore.Text.TextHandle.UpdateWithHash (System.Int32 hashCode) (at <fb6030ab83b0456183d6f22ad21716e1>:0)
UnityEngine.UIElements.UITKTextHandle.UpdateMesh () (at <06b24f3f8f804fdfb8ea805f63cc29b0>:0)
UnityEngine.UIElements.UITKTextJobSystem+GenerateTextJobData.Execute (System.Int32 index) (at <06b24f3f8f804fdfb8ea805f63cc29b0>:0)
Unity.Jobs.IJobParallelForExtensions+ParallelForJobStruct`1[T].Execute (T& jobData, System.IntPtr additionalPtr, System.IntPtr bufferRangePatchData, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at <eb019d4a63d44ca7a73547c38156dec2>:0)

SolarianZ avatar Aug 17 '24 07:08 SolarianZ

Unity BUG 所致:https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-78458

SolarianZ avatar Aug 20 '24 11:08 SolarianZ

Fixed in 6000.0.26f1, 6000.1.0a3, 7000.0.0a10

SolarianZ avatar Nov 08 '24 13:11 SolarianZ