Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Project Tiny no DisplayInfo Singleton

Discussion in 'Project Tiny' started by ry511, Nov 26, 2020.

  1. ry511

    ry511

    Joined:
    Jul 24, 2016
    Posts:
    60
    I just updated to Project Tiny 0.31.0-preview 24 and am getting the following error about not being able to get the DisplayInfo singleton component int he CameraComponent class. I can still run the game and interact with it but am getting this error every frame.

    InvalidOperationException: GetSingleton<Unity.Tiny.DisplayInfo>() requires that exactly one Unity.Tiny.DisplayInfo exist that match this query, but there are 0.
    Unity.Entities.EntityQueryImpl.GetSingleton[T] () (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/Iterators/EntityQuery.cs:759)
    Unity.Entities.EntityQuery.GetSingleton[T] () (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/Iterators/EntityQuery.cs:1341)
    Unity.Tiny.Rendering.UpdateCameraMatricesSystem.OnUpdate () (at Library/PackageCache/com.unity.tiny@0.31.0-preview.24/Unity.Tiny.Rendering/CameraComponents.cs:352)
    Unity.Entities.SystemBase.Update () (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/SystemBase.cs:413)
    Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/ComponentSystemGroup.cs:435)
    UnityEngine.Debug:LogException(Exception)
    Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/Stubs/Unity/Debug.cs:19)
    Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/ComponentSystemGroup.cs:440)
    Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/ComponentSystemGroup.cs:387)
    Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/ComponentSystem.cs:113)
    Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.16.0-preview.21/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)

    Is there anything I need to do to get this resolved?

    Thanks in advance!
     
  2. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    Hello @ry511
    Could it be that you are testing your application inside the Unity Editor during play mode?
    Project Tiny does not support play mode, so all application testing should be done by building and running an executable.
     
    longsl likes this.
  3. ry511

    ry511

    Joined:
    Jul 24, 2016
    Posts:
    60
    Very interesting I was running in play mode before this update just fine!

    I am getting the following errors when I build:

    ~Library\PackageCache\com.unity.tiny@0.31.0-preview.24\Unity.Tiny.GameSave\GameSaveSystem.cs(9,37): error CS0122: 'Binding' is inaccessible due to its protection level

    ~Error building Player because scripts had compiler errors

    ~Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    ~UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x0027c] in <d1bec46880064709a5e713ad543e6d96>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <d1bec46880064709a5e713ad543e6d96>:0
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    I was going to make another post about this but since I was brought up here I will talk about it now.

    Thanks for getting back to me, and let me know if there is anything I need to do.

    Thanks in advance!
     
  4. NagaChiang

    NagaChiang

    Joined:
    Sep 17, 2020
    Posts:
    13
    I encountered the same error after updating Tiny from 0.29.0 to 0.31.0 in my project. As I remember, you need to add a script "Universal Additional Camera Data" on your main camera, and move the camera to the root scene instead of subscene.
     
    Ismaeel370, mattbrandmm and Seaqqull like this.
  5. ry511

    ry511

    Joined:
    Jul 24, 2016
    Posts:
    60
    Looks like that worked! Thanks so much!