#Build error in 6.1, not in 6.0

1 messages · Page 1 of 1 (latest)

tough wolf
#

How can this var tmp = new WeakObjectReference<GameObject>(authoring.prefab);
error into error CS1503: Argument 1: cannot convert from 'UnityEngine.GameObject' to 'Unity.Entities.Serialization.UntypedWeakReferenceId'?

It's calling:

#if UNITY_EDITOR
        public WeakObjectReference(TObject unityObject)
        {
            this.Id = UntypedWeakReferenceId.CreateFromObjectInstance(unityObject);
        }
#endif

Tested with an error 6000.1.6f1 and got a report from 6000.1.7f1
We use it successfully at work with 6000.1.4f1 and my personal project uses 6000.0.48f1.

Any idea why this is happening?

#

The authoring asmdef where this is used is guarded with:

"defineConstraints": [
        "UNITY_EDITOR"
    ],
upbeat stone
#

Just to check, your authoring doesn't have internal access to entities or another package does it

tough wolf
#

not directly. full asmdef:

{
  "name": "NZCore.Hybrid.Authoring",
  "rootNamespace": "",
  "references": [
    "Unity.Burst",
    "Unity.Collections",
    "Unity.Entities",
    "Unity.Entities.Hybrid",
    "Unity.Mathematics",
    "NZCore",
    "NZCore.Hybrid.Data",
    "Unity.Addressables"
  ],
  "includePlatforms": [],
  "excludePlatforms": [],
  "allowUnsafeCode": true,
  "overrideReferences": false,
  "precompiledReferences": [],
  "autoReferenced": true,
  "defineConstraints": [
    "UNITY_EDITOR"
  ],
  "versionDefines": [],
  "noEngineReferences": false
}

NZCore has internal access though