Subscene script disappears on creation?

When creating a new subscene (from selection or not), the script shows as “missing”. I can change to debug and then update it, but then it loses all reference as a subscene.

When playing (in editor) I get a warning:

The referenced script (Unknown) on this Behaviour is missing!

And this error:

ArgumentException: We are reading a UnityEngine.Object however no ObjectTable was provided to the ManagedObjectBinaryReader.
Unity.Entities.Serialization.ManagedObjectBinaryReader.Unity.Serialization.Binary.IContravariantBinaryAdapter<UnityEngine.Object>.Deserialize (Unity.Serialization.Binary.IBinaryDeserializationContext context) (at ./Library/PackageCache/com.unity.entities@1.1.0-pre.3/Unity.Entities/Serialization/ManagedObjectBinarySerialization.cs:223)
Unity.Serialization.Binary.BinaryPropertyReader.ReadValueWithAdapters[TValue] (TValue& value, Unity.Serialization.Binary.BinaryAdapterCollection+Enumerator adapters, System.Boolean isRoot) (at ./Library/PackageCache/com.unity.serialization@3.1.1/Runtime/Unity.Serialization/Binary/Properties/Internal/BinaryPropertyReader.cs:153)
Unity.Serialization.Binary.BinaryPropertyReader.ReadValue[TValue] (TValue& value, System.Boolean isRoot) (at ./Library/PackageCache/com.unity.serialization@3.1.1/Runtime/Unity.Serialization/Binary/Properties/Internal/BinaryPropertyReader.cs:137)
Unity.Serialization.Binary.BinaryPropertyReader.ReadValue[TValue] () (at ...

and this warning:

Error when processing 'AsyncLoadSceneJob(VirtualArtifacts/Extra/24/24bb55d99e30b8d71df4d9f07f864657.0.entities)': We are reading a UnityEngine.Object however no ObjectTable was provided to the ManagedObjectBinaryReader.
UnityEngine.Debug:LogWarning (object)
Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.1.0-pre.3/Unity.Entities/Stubs/Unity/Debug.cs:13)
Unity.Scenes.SceneSectionStreamingSystem:UpdateLoadOperation (Unity.Entities.SystemState&,Unity.Scenes.AsyncLoadSceneOperation,Unity.Entities.World,Unity.Entities.Entity,bool) (at ./Library/PackageCache/com.unity.entities@1.1.0-pre.3/Unity.Scenes/SceneSectionStreamingSystem.cs:599)...

I cleared my SceneDependencyCache thinking it would correct itself (perhaps I crossed the proverbial streams somewhere).

Any ideas?
(I’m on Entities 1.1.0-pre.3)

Opening another scene, and then re-opening the one with the subscene gives me this.

Reimport the Entities package from the project window, right click, reimport

This is just a weird editor issue where packages don’t import

2 Likes

Good suggestion- but unfortunately that didn’t change it’s behavior.
I still get missing Subscene script reference as soon as it’s created.

Did you mean, reimport the Entities package from the ‘package manager window’?
I don’t see the package represented in the project window…

well, Unity- am I just SOL or is there something I can do to understand/resolve this?

This happens when upgrading from Entities 1.0 to something newer without deleting the Library directory afterwards and having Unity rebuild it. Usually deleting the Library cache fixes it.

No, in the project window under packages find unity entities and right click reimport

Note this fix no longer works in 2023.3 which is super annoying, packages constantly going missing

1 Like

Thank you!

Tertle you are a god among men! I tried everything… then reimporting all my packages magically fixed it.