Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Error in Unity.Tiny.GameSave while building | Tiny ver 0.31.0-preview.26

Discussion in 'Project Tiny' started by reality_mirek, Nov 11, 2020.

  1. reality_mirek

    reality_mirek

    Joined:
    Jun 27, 2016
    Posts:
    4
    I've downloaded sample projects for Unity Tiny from here https://github.com/Unity-Technologies/ProjectTinySamples and I've tried to build few of them (2D, 3D, Spaceships) each was built on Desktop target (I've also tried iOS) on Unity version 2020.1.12f1 and 2020.1.10f1 and each time I got the same error in Unity.Tiny.GameSave package code:

    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

    The offending line of code is:
    using static Unity.Baselib.LowLevel.Binding;

    I have not changed anything in the project, no packages were updated, it failed to build as soon as I have downloaded, opened the project and tried to build it. Here is the packages manifest:

    Code (csharp):
    1. {
    2.   "dependencies": {
    3.     "com.unity.2d.sprite": "1.0.0",
    4.     "com.unity.2d.tilemap": "1.0.0",
    5.     "com.unity.collab-proxy": "1.3.9",
    6.     "com.unity.ide.rider": "1.2.1",
    7.     "com.unity.ide.visualstudio": "2.0.3",
    8.     "com.unity.ide.vscode": "1.2.2",
    9.     "com.unity.test-framework": "1.1.18",
    10.     "com.unity.textmeshpro": "3.0.1",
    11.     "com.unity.timeline": "1.3.2",
    12.     "com.unity.tiny.all": "0.31.0-preview.26",
    13.     "com.unity.ugui": "1.0.0",
    14.     "com.unity.modules.ai": "1.0.0",
    15.     "com.unity.modules.androidjni": "1.0.0",
    16.     "com.unity.modules.animation": "1.0.0",
    17.     "com.unity.modules.assetbundle": "1.0.0",
    18.     "com.unity.modules.audio": "1.0.0",
    19.     "com.unity.modules.cloth": "1.0.0",
    20.     "com.unity.modules.director": "1.0.0",
    21.     "com.unity.modules.imageconversion": "1.0.0",
    22.     "com.unity.modules.imgui": "1.0.0",
    23.     "com.unity.modules.jsonserialize": "1.0.0",
    24.     "com.unity.modules.particlesystem": "1.0.0",
    25.     "com.unity.modules.physics": "1.0.0",
    26.     "com.unity.modules.physics2d": "1.0.0",
    27.     "com.unity.modules.screencapture": "1.0.0",
    28.     "com.unity.modules.terrain": "1.0.0",
    29.     "com.unity.modules.terrainphysics": "1.0.0",
    30.     "com.unity.modules.tilemap": "1.0.0",
    31.     "com.unity.modules.ui": "1.0.0",
    32.     "com.unity.modules.uielements": "1.0.0",
    33.     "com.unity.modules.umbra": "1.0.0",
    34.     "com.unity.modules.unityanalytics": "1.0.0",
    35.     "com.unity.modules.unitywebrequest": "1.0.0",
    36.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    37.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    38.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    39.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    40.     "com.unity.modules.vehicles": "1.0.0",
    41.     "com.unity.modules.video": "1.0.0",
    42.     "com.unity.modules.vr": "1.0.0",
    43.     "com.unity.modules.wind": "1.0.0",
    44.     "com.unity.modules.xr": "1.0.0"
    45.   },
    46.   "enableLockFile": false
    47. }

    I hope the issue is in configuration of the project and someone will be able to point out the probable cause, thanks!
     
  2. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    258
    It's very strange
    Can you try to do Assets> reimport all?
    also, make sure the editor is switched to standalone build targets
     
  3. CheuckWin

    CheuckWin

    Joined:
    Dec 18, 2018
    Posts:
    5
    I have the same problem
     
  4. reality_mirek

    reality_mirek

    Joined:
    Jun 27, 2016
    Posts:
    4
    Reimport All did not help, the same error appears when I try to build on Mono with Windows x64 target.

    After opening one project I noticed that the PackageManagerSettings.asset had differences between what is in the repo and what I have locally:

    diff --git a/TinyPhysics/ProjectSettings/PackageManagerSettings.asset b/TinyPhysics/ProjectSettings/PackageManagerSettings.asset
    index 8e5b258..be4a797 100644
    --- a/TinyPhysics/ProjectSettings/PackageManagerSettings.asset
    +++ b/TinyPhysics/ProjectSettings/PackageManagerSettings.asset
    @@ -20,10 +20,10 @@ MonoBehaviour:
    m_Registries:
    - m_Id: main
    m_Name:
    - m_Url: https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates
    + m_Url: https://packages.unity.com
    m_Scopes: []
    m_IsDefault: 1
    - m_Capabilities: 0
    + m_Capabilities: 7
    m_UserSelectedRegistryName:
    m_UserAddingNewScopedRegistry: 0
    m_RegistryInfoDraft:

    Does this look helpful abut what may be the problem or is this expected that the url here changes?
     
  5. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    258
    I've updated the PackageManagerSettings.asset for the samples
    but I don't think its the issue here
     
  6. reality_mirek

    reality_mirek

    Joined:
    Jun 27, 2016
    Posts:
    4
    It did not help with this particular issue indeed.
    When I removed the Library directory for the Tiny Kitchen sample, pulled the last commit and opened the project fresh I happened to get this error, which has already appeared before when I was opening the samples, only when opening the project for the first time. It did not appear on every sample project, but every sample project results with the same build error as in my initial description of the problem, so that's probably not the root issue as well. I was running Reimport All in each sample project after opening Unity too.


    upload_2020-11-24_10-22-9.png
     
  7. CocosGames

    CocosGames

    Joined:
    Aug 31, 2014
    Posts:
    35
    You said you were using
    Tiny ver 0.31.0-preview.26
    but why the error said it's about Library/PackageCache/com.unity.tiny@0.31.0-preview.24/??
     
  8. reality_mirek

    reality_mirek

    Joined:
    Jun 27, 2016
    Posts:
    4
    Yes, that is exactly right. These are all directories with "tiny" in Library/PackageCache on a freshly (first time )opened sample TinySpaceship

    d---- 2020-11-24 12:32 com.unity.tiny.all@0.31.0-preview.26
    d---- 2020-11-24 12:32 com.unity.tiny.desktop@0.31.0-preview.24
    d---- 2020-11-24 12:32 com.unity.tiny.web@0.31.0-preview.24
    d---- 2020-11-24 12:32 com.unity.tiny@0.31.0-preview.24

    You can see there are version mismatches, but those are intended as this is how the package.json of com.unity.tiny.all@0.31.0-preview.26 looks like:

    {
    "name": "com.unity.tiny.all",
    "displayName": "Project Tiny Full",
    "version": "0.31.0-preview.26",
    "unity": "2020.1",
    "unityRelease": "0f1",
    "description": "This package includes all Project tiny packages and their dependencies",
    "dependencies": {
    "com.unity.dots.runtime": "0.31.0-preview.24",
    "com.unity.entities": "0.16.0-preview.21",
    "com.unity.tiny": "0.31.0-preview.24",
    "com.unity.tiny.web": "0.31.0-preview.24",
    "com.unity.tiny.desktop": "0.31.0-preview.24",

    "com.unity.physics": "0.5.1-preview.2",
    "com.unity.2d.entities.physics": "0.1.0-preview.3",
    "com.unity.platforms": "0.9.0-preview.9",
    "com.unity.platforms.android": "0.9.0-preview.9",
    "com.unity.platforms.ios": "0.9.0-preview.9",
    "com.unity.platforms.linux": "0.9.0-preview.9",
    "com.unity.platforms.macos": "0.9.0-preview.9",
    "com.unity.platforms.web": "0.9.0-preview.9",
    "com.unity.platforms.windows": "0.9.0-preview.9",
    "com.unity.platforms.desktop": "0.9.0-preview.9",
    "com.unity.render-pipelines.universal": "8.2.0",
    "com.unity.rendering.hybrid": "0.10.0-preview.21",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.uielements": "1.0.0"
    },
    "upmCi": {
    "footprint": "1c606ddab948ff46b7213224eacd430213b0dc23"
    },
    "repository": {
    "url": "https://github.com/Unity-Technologies/tiny-all.git",
    "type": "git",
    "revision": "3097ae6c0aae609e6f25a42aecac7e87b38e226b"
    }
    }

    I guess this is not an issues as this problem would occur for all users. So far there are few people who have posted on this forum having this same issue and internally in our company we've tried building Project Tiny samples on different machines, OS and Unity versions and we all got the same exact error while building on standalone platform as in my initial message.
     
  9. CocosGames

    CocosGames

    Joined:
    Aug 31, 2014
    Posts:
    35
    Correct, I see... Try to update Visual Studio and Windows SDK?
     
  10. windwolfx_23

    windwolfx_23

    Joined:
    Jan 15, 2015
    Posts:
    10
    I'm having the same error, won't 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"
     
  11. ry511

    ry511

    Joined:
    Jul 24, 2016
    Posts:
    30
    Just wanted to put in here so the reach is known. I am getting the same error when trying to build for both PC, Mac, Linux as well as android.
     
unityunity