Oh, sorry to bother then, i don't usually use Discord, I wasn't aware of the fix.
On the subject of TMP, i've also been experiencing some errors, i believe regarding cached materials. Not entirely sure if this requires a new thread but i'll post the error log here just to give you some feedback. Please let me know if I should start a new thread and discuss this further.
The error is not game breaking and there is no noticeable visual bug, it just displays on the console whenever I print text. This happens with either the material that is created when generating the atlas or any material created afterwards and assigned to the object in the editor. (Font materials have the proper RevealableTMProText shader)
Code: Select all
ArgumentNullException: Value cannot be null.
Parameter name: source
UnityEngine.Material..ctor (UnityEngine.Material source) (at <480508088aee40cab70818ff164a29d5>:0)
TMPro.TMP_Text.CreateMaterialInstance (UnityEngine.Material source) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs:1481)
TMPro.TextMeshProUGUI.GetMaterial (UnityEngine.Material mat) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs:757)
TMPro.TMP_Text.get_fontMaterial () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs:185)
TMPro.TextMeshProUGUI.GetMaterials (UnityEngine.Material[] mats) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMPro_UGUI_Private.cs:788)
TMPro.TMP_Text.get_fontMaterials () (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Text.cs:211)
Naninovel.UI.RevealableTMProText.SetMaterialProperties (UnityEngine.Vector4 lineClipRect, UnityEngine.Vector4 charClipRect, System.Single charFadeWidth, System.Single charSlantAngle) (at Assets/_ThirdParty/Naninovel/Runtime/UI/TextPrinter/RevealableTMProText.cs:180)
Naninovel.UI.RevealableTMProText.Update () (at Assets/_ThirdParty/Naninovel/Runtime/UI/TextPrinter/RevealableTMProText.cs:116)
Naninovel.UI.RevealableTMProText.OnRectTransformDimensionsChange () (at Assets/_ThirdParty/Naninovel/Runtime/UI/TextPrinter/RevealableTMProText.cs:95)
UnityEngine.Object:Instantiate(GameObject)
Naninovel.Engine:Instantiate(GameObject, String, Nullable`1) (at Assets/_ThirdParty/Naninovel/Runtime/Engine/Engine.cs:270)
Naninovel.<InstantiatePrefabAsync>d__29:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/UI/UIManager.cs:122)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder`1:Start(<InstantiatePrefabAsync>d__29&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:279)
Naninovel.UIManager:InstantiatePrefabAsync(GameObject)
Naninovel.<InitializeAsync>d__34:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/Actor/TextPrinter/UITextPrinter.cs:56)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder:Start(<InitializeAsync>d__34&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:131)
Naninovel.UITextPrinter:InitializeAsync()
Naninovel.<ConstructActorAsync>d__29:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/Actor/ActorManager.cs:217)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder`1:Start(<ConstructActorAsync>d__29&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:279)
Naninovel.ActorManager`4:ConstructActorAsync(String)
Naninovel.OrthoActorManager`4:<>n__0(String)
Naninovel.<ConstructActorAsync>d__12:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/Actor/OrthoActorManager.cs:49)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder`1:Start(<ConstructActorAsync>d__12&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:279)
Naninovel.OrthoActorManager`4:ConstructActorAsync(String)
Naninovel.<AddActorAsync>d__17:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/Actor/ActorManager.cs:130)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder`1:Start(<AddActorAsync>d__17&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:279)
Naninovel.ActorManager`4:AddActorAsync(String)
Naninovel.<GetOrAddActorAsync>d__1`4:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/Actor/ActorManagerExtensions.cs:29)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder`1:Start(<GetOrAddActorAsync>d__1`4&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:279)
Naninovel.ActorManagerExtensions:GetOrAddActorAsync(IActorManager`4, String)
Naninovel.Commands.<GetOrAddPrinterAsync>d__13:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/Command/Printer/PrinterCommand.cs:39)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder`1:Start(<GetOrAddPrinterAsync>d__13&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:279)
Naninovel.Commands.PrinterCommand:GetOrAddPrinterAsync()
Naninovel.Commands.<HoldResourcesAsync>d__11:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/Command/Printer/PrinterCommand.cs:20)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder:Start(<HoldResourcesAsync>d__11&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:131)
Naninovel.Commands.PrinterCommand:HoldResourcesAsync()
Naninovel.<>c:<HoldResourcesAsync>b__4_0(IPreloadable) (at Assets/_ThirdParty/Naninovel/Runtime/ScriptPlayer/ScriptPlaylist.cs:61)
System.Linq.SelectEnumerableIterator`2:MoveNext()
UniRx.Async.Internal.ArrayPoolUtil:Materialize(IEnumerable`1) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/Internal/ArrayPoolUtil.cs:67)
UniRx.Async.<WhenAll>d__54:MoveNext() (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/UniTask.WhenAll.cs:41)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder:Start(<WhenAll>d__54&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:131)
UniRx.Async.UniTask:WhenAll(IEnumerable`1)
Naninovel.<HoldResourcesAsync>d__4:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/ScriptPlayer/ScriptPlaylist.cs:61)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder:Start(<HoldResourcesAsync>d__4&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:131)
Naninovel.ScriptPlaylist:HoldResourcesAsync(Int32, Int32)
Naninovel.<PreloadAndPlayAsync>d__99:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/ScriptPlayer/ScriptPlayer.cs:320)
UniRx.Async.CompilerServices.AsyncUniTaskMethodBuilder:Start(<PreloadAndPlayAsync>d__99&) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/AsyncUniTaskMethodBuilder.cs:131)
Naninovel.ScriptPlayer:PreloadAndPlayAsync(String, Int32, Int32, String)
Naninovel.UI.TitleNewGameButton:<StartNewGameAsync>b__7_0() (at Assets/_ThirdParty/Naninovel/Runtime/UI/TitleUI/TitleNewGameButton.cs:47)
Naninovel.<ResetStateAsync>d__71:MoveNext() (at Assets/_ThirdParty/Naninovel/Runtime/State/StateManager.cs:204)
UniRx.Async.CompilerServices.MoveNextRunner`1:Run() (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/CompilerServices/MoveNextRunner.cs:18)
UniRx.Async.Internal.FuncExtensions:Invoke(Action, AsyncOperation) (at Assets/_ThirdParty/Naninovel/ThirdParty/UniTask/UniRx.Async/Internal/Hack.cs:18)
UnityEngine.AsyncOperation:InvokeCompletionEvent()
Lastly, since this is my introductory thread on the forum let me congratulate you on the framework, it is a monumental work and I hope that lot more users will use it in the future.