Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Error on loading project. Can't open project but can still build. Need help!

Discussion in 'Project Tiny' started by THAMATRIX, Oct 14, 2019.

  1. THAMATRIX

    THAMATRIX

    Joined:
    Sep 6, 2018
    Posts:
    10
    To give some context:
    I use:
    -Unity 2019.1.8
    -Tiny 0.14.5
    -TextMeshPro 1.3.0

    After making some objects in the editor inactive i suddenly get this error when trying to open my tiny project asset:
    Exception thrown while invoking [OnOpenAssetAttribute] method 'Unity.Tiny.UTProject:OnOpenAsset (int,int)' : NullReferenceException: Object reference not set to an instance of an object
    TMPro.TextMeshPro.LoadFontAsset () (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMPro_Private.cs:479)
    TMPro.TMP_Text.set_font (TMPro.TMP_FontAsset value) (at Library/PackageCache/com.unity.textmeshpro@1.3.0/Scripts/Runtime/TMP_Text.cs:143)
    Unity.Tiny.BitmapFontRenderingBaseBindings`1[TText].Transfer (Unity.Tiny.TinyEntity entity, TText text) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Bindings/Text/TextRenderingBaseBindings.cs:61)
    Unity.Tiny.TextRenderingBaseBindings`1[TText].Transfer (Unity.Tiny.TinyEntity entity) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Bindings/Text/TextRenderingBaseBindings.cs:46)
    Unity.Tiny.BitmapTextBaseBindings.Transfer (Unity.Tiny.TinyEntity entity) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Bindings/Text/TextRenderingBaseBindings.cs:128)
    Unity.Tiny.BindingsManager.Transfer (Unity.Tiny.TinyEntity entity) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Bindings/Scripts/BindingsManager.cs:175)
    Unity.Tiny.EntityGroupGraph.Transfer () (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/SceneGraph/EntityGroupGraph.cs:735)
    Unity.Tiny.EntityGroupGraph.CreateFromEntityGroup (Unity.Tiny.TinyEntityGroup entityGroup, Unity.Tiny.TinyContext context) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/SceneGraph/EntityGroupGraph.cs:30)
    Unity.Tiny.TinyEntityGroupManager.LoadEntityGroup (Unity.Tiny.TinyEntityGroup+Reference entityGroupRef, System.Int32 index, System.Boolean rebuildWorkspace) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Context/IEntityGroupManager/TinyEntityGroupManager.cs:360)
    Unity.Tiny.TinyEntityGroupManager.InitialGroupLoading () (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Context/IEntityGroupManager/TinyEntityGroupManager.cs:230)
    Unity.Tiny.TinyEntityGroupManager+<>c.<RegisterInitialLoading>b__54_0 (Unity.Tiny.TinyProject project, Unity.Tiny.TinyContext context) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Context/IEntityGroupManager/TinyEntityGroupManager.cs:217)
    Unity.Tiny.TinyEditorApplication.LoadContext (Unity.Tiny.TinyEditorContext context) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Windows/TinyEditorApplication.cs:949)
    Unity.Tiny.TinyEditorApplication.LoadProject (System.String projectFile, Unity.Tiny.TinyContext context) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Windows/TinyEditorApplication.cs:561)
    Unity.Tiny.TinyEditorApplication.LoadProject (System.String projectFile) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Windows/TinyEditorApplication.cs:512)
    Unity.Tiny.UTProject.OnOpenAsset (System.Int32 instanceId, System.Int32 line) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/ScriptableObject/UTProject.cs:23)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    I have been searching for hours on google for some awnsers but i could not find any. I have tried alot:
    -changing tiny version
    -chaning textmeshpro version
    -changing unity version
    -GUID remapping tool from TextMeshPro

    I realy need help with this problem!
     
  2. THAMATRIX

    THAMATRIX

    Joined:
    Sep 6, 2018
    Posts:
    10
    *Note: All other tiny packages like the examples open without errors. It is only my project that does not want to open and gives this error.
     
  3. THAMATRIX

    THAMATRIX

    Joined:
    Sep 6, 2018
    Posts:
    10
    *Edit: Fixed it myself. I hope someone of unity's staff reads this. You can recreate this bugg by following these 3 steps:

    -Add text with font asset to your project.
    -set object to inactive in editor.
    -try to load your project again.

    Looks like unity tiny removes the font reference altogheter when making the gameobject inactive. In addition to that, when loading the scene it buggs out and doesn't load the scene when a reference to a font is missing. Hope this is already fixed in newer releases or can be updated in a new Update.
     
  4. THAMATRIX

    THAMATRIX

    Joined:
    Sep 6, 2018
    Posts:
    10
    To fix it you need to remove the fonts from your project and then reload the scene. This time it will work
     
  5. JC-Cimetiere

    JC-Cimetiere

    Unity Technologies

    Joined:
    May 8, 2014
    Posts:
    123

    Just be aware you are using an old version of Project Tiny, that will not get any update and will not upgrade either to newer previews.

    Check our latest update (https://forum.unity.com/threads/oct-2019-update-on-project-tiny-roadmap.754850/) lots of changes are undergoing for Project Tiny.
    If you haven’t started yet experimenting with Project Tiny, we recommend that you wait until the next preview before testing it. We are aware that the current Project Tiny package (preview-0.16.1) is broken with the latest beta and its dependencies, and we do not plan to fix this until the next preview.

    If you are currently working with preview-0.16.1, keep in mind that content you’ve authored in current preview of Project Tiny will have to be reworked and C# code will also need some adjustments. There won’t be any automated upgrade to the next preview.

    JC