Search Unity

Null reference when building player content

Discussion in 'Addressables' started by Roni92pl, Jan 30, 2019.

  1. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    396
    This is what I got after I try to build player content:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.AddressableAssets.GenerateLocationListsTask.GetLoadPath (UnityEditor.AddressableAssets.AddressableAssetGroup group, System.String name) (at Library/PackageCache/com.unity.addressables@0.5.3-preview/Editor/Build/BuildPipelineTasks/GenerateLocationListsTask.cs:79)
    3. UnityEditor.AddressableAssets.GenerateLocationListsTask.Run () (at Library/PackageCache/com.unity.addressables@0.5.3-preview/Editor/Build/BuildPipelineTasks/GenerateLocationListsTask.cs:66)
    4. UnityEditor.Build.Pipeline.BuildTasksRunner.Run (System.Collections.Generic.IList`1[T] pipeline, UnityEditor.Build.Pipeline.Interfaces.IBuildContext context) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.2.1-preview/Editor/Shared/BuildTasksRunner.cs:50)
    5. UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)
     
  2. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    @Roni92pl I've seen this today and it happened because the "Built In Data" had no "BundledAssetGroupSchema" but the addressables tried to access it without testing for null. The only fix that worked for us was to add one (although that is not really the intention of the "Built in data" group).
     
    FlorentFal likes this.
  3. fabioColombini

    fabioColombini

    Joined:
    Dec 9, 2013
    Posts:
    30