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

'TinyProject-DoNotEdit' scene edited with fatal consequences

Discussion in 'Project Tiny' started by vikpek, Jun 20, 2019.

  1. vikpek

    vikpek

    Joined:
    Aug 17, 2014
    Posts:
    7
    Good day!
    I managed to edit the scene "TinyProject-DoNotEdit" - yes I realize how that sounds. I'm also quite sure I didn't edit it directly... But nevertheless all new projects are affected by this and I cannot open the actual tiny scene anymore. Re-installing all Unity Instances/UnityHub, re-cloning the repository and even re-installing/deleting the tiny-preview package (directly in the explorer and also in the Unity Package manager) did not help.

    Any hint is greatly appreciated. Thanks in advance!

    Here is the error message and below a screenshot of the 'DoNotEdit' scene.

    Code (CSharp):
    1.  NullReferenceException: Object reference not set to an instance of an object
    2. Unity.Tiny.UICanvasBindings.Transfer (Unity.Tiny.TinyEntity entity) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Bindings/UILayout/UICanvasBindings.cs:40)
    3. Unity.Tiny.BindingsManager.Transfer (Unity.Tiny.TinyEntity entity) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Bindings/Scripts/BindingsManager.cs:175)
    4. Unity.Tiny.EntityGroupGraph.Transfer () (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/SceneGraph/EntityGroupGraph.cs:735)
    5. 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)
    6. 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)
    7. Unity.Tiny.TinyEntityGroupManager.InitialGroupLoading () (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Context/IEntityGroupManager/TinyEntityGroupManager.cs:230)
    8. 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)
    9. Unity.Tiny.TinyEditorApplication.LoadContext (Unity.Tiny.TinyEditorContext context) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Windows/TinyEditorApplication.cs:949)
    10. 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)
    11. Unity.Tiny.TinyEditorApplication.LoadPersistenceId (System.String persistenceId, Unity.Tiny.TinyContext context) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Windows/TinyEditorApplication.cs:623)
    12. Unity.Tiny.TinyEditorApplication.LoadTemp (Unity.Tiny.ContextUsage usage) (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Windows/TinyEditorApplication.cs:853)
    13. Unity.Tiny.TinyEditorApplication+<>c.<Update>b__32_0 () (at Library/PackageCache/com.unity.tiny@0.14.5-preview/Editor/Windows/TinyEditorApplication.cs:141)
    14. UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:209)
     

    Attached Files:

  2. raymondyunity

    raymondyunity

    Unity Technologies

    Joined:
    Apr 30, 2018
    Posts:
    122
    Try adding a new Hierarchy window. Right click your hierarchy window tab > Add Tab > Hierarchy.

    This will be fixed in an upcoming Unity version.
     
  3. vikpek

    vikpek

    Joined:
    Aug 17, 2014
    Posts:
    7
    Thanks for the suggestion. Unfortunately this doesn't help. By now we have this issue on multiple machines. The solution doesn't work on any of those.

    We still didn't figure out when this happens. I assumed it might be the case after renaming assets withing Unity - but when I try this on purpose I cannot reproduce the error.

    Is there any other way to approach this? We're willing to do anything that takes less effort than setting up a new system (or VMs).

    Cheers
     
  4. vikpek

    vikpek

    Joined:
    Aug 17, 2014
    Posts:
    7
    We found the issue: It happens after duplicating content from one entity group to another. In our case the UICanvas lost the reference to the UICamera. Afterwards it's impossible to open the scene so it cannot be fixed.

    Here's a long version for those of you who run into this problem copied from our team wiki:

    Background:
    The problem is related to a faulty entity group. When this group is loaded into the hierarchy the issue appears. And since Unity saves the hierarchy beyond restarts and Library-Deletion etc. this issue appears on start.

    What compromises an Entity Group:
    This happens due to a missing reference (in our case it was the Camera reference in the UICanvas after duplicating content from one entity group to another). Afterwards it's not possible to open the entity group and to fix the missing reference.

    How to avoid this issue:
    1. Don't copy content from one entity group to another and rather duplicate whole entity groups.
    or
    2. When you want to risk and you copy content from one entity group to another - MAKE SURE NO REFERENCES ARE MISSING. When you close the scene you can do this:

    Solution:
    1. Close Unity
    2. Revert to an old repository state (where you're quite sure that this state didn't had the faulty entity group / or when it was still ok)
    3. Open Unity and make sure only one entity group is loaded - and that it's one that is definitely ok.
    4. Right-Click the Hierarchy Tab and create a new Hierachy Tab
    5. Close the old Hierarchy Tab
    6. Close Unity
    7. Revert to the newest commit
    8. Open Unity - it should show the ECS view again.