#Could not open file <project>/StreamingAssets/EntityScenes/...entityheader for read

1 messages · Page 1 of 1 (latest)

ruby ingot
#

I see a similar question/problem in the thread, but i thought perhaps if i added the Player.log output file, someone might be able to help.

The file it is looking for is there, but it's 0Kb in size

Also i've had this problem in both pre.15 and pre.44 - i tried out pre.47 but it broke my project in way that no entities were visible on the screen.

Also i'm not actively using any streaming assets, so i don't know why the build wants to use them

livid pilot
#

basically 99% of the time this means the asset import worker failed in some way, i think. look in the log for [Worker0] or [Worker1] and then some error happening

ruby ingot
livid pilot
#

it would be in Logs/AssetImportWorker<something>

ruby ingot
#

Getting some weird stuff:

Assembly reference Packages/com.unity.entities/Unity.Scenes.Editor/Internals/Properties/Unity.Properties.Internals.asmref has no target assembly definition
========================================================================
Worker process is ready to serve import requests
Assembly reference Packages/com.unity.entities/Unity.Scenes.Editor/Internals/Properties/Unity.Properties.Internals.asmref has no target assembly definition
Begin MonoManager ReloadAssembly
Symbol file LoadedFromMemory doesn't match image C:\src\Cell Simulation\Library\PackageCache\com.unity.visualscripting@1.8.0\Editor\VisualScripting.Core\Dependencies\YamlDotNet\Unity.VisualScripting.YamlDotNet.dll
Symbol file LoadedFromMemory doesn't match image C:\src\Cell Simulation\Library\PackageCache\com.unity.visualscripting@1.8.0\Editor\VisualScripting.Core\Dependencies\DotNetZip\Unity.VisualScripting.IonicZip.dll
- Loaded All Assemblies, in  1.104 seconds
Refreshing native plugins compatible for Editor in 7.09 ms, found 4 plugins.
Native extension for WindowsStandalone target not found
Assembly reference Packages/com.unity.entities/Unity.Scenes.Editor/Internals/Properties/Unity.Properties.Internals.asmref has no target assembly definition
TypeManager.Initialize took: 209ms
Launched and connected shader compiler UnityShaderCompiler.exe after 0.05 seconds
Mono: successfully reloaded assembly
- Finished resetting the current domain, in  1.774 seconds

Not - to my knowledge - using any visual scripting

livid pilot
#

you probably need to remove it from your package manifest

ruby ingot
#

It didn't solve it. But i found a real error futher down:

Exception thrown during SubScene import: System.ArgumentException: Blittable component type 'WorldProperties' contains a (potentially nested) pointer field. Serializing bare pointers will likely lead to runtime errors. Remove this field and consider serializing the data it points to another way such as by using a BlobAssetReference or a [Serializable] ISharedComponent. If for whatever reason the pointer field should in fact be serialized, add the [ChunkSerializable] attribute to your type to bypass this error.

My WorldProperties looks like this:

public struct WorldProperties : IComponentData
{
    public float2 Dimension;
    public float Speed;
    public float Strength;
    public float Scale;
    public float Influence;
    public NativeArray<float> Rules; // Id1*32+Id2
}

The only thing i can find that "might not be" blittable is the NativeArray. My NativeArray is always 32*32 floats and it's being baked an not re-dimensioned later, so i wonder "why you so mad, it's only a game"?

#

I am changing the values in that array btw - that is why i did not try a BlobAsset...

livid pilot
#

the nativearray does indeed have a pointer in it, and serializing it will not carry the floats inside

#

may i recommend a dynamicbuffer of size 1024

ruby ingot
#

I solved it (edit: actually not) by not initializing it in the baker, but instead on the first job running to setup the stuff - the values were never baked anyways - just a placeholder for when the game was running

#

I'm still left with the original error of

Could not open file C:/src/Cell Simulation/Build/Cell Simulation_Data/StreamingAssets/EntityScenes/f2dec95dcbfb20a42821d3b3002a1719.entityheader for read
Loading Entity Scene failed because the entity header file couldn't be resolved: guid=f2dec95dcbfb20a42821d3b3002a1719.
rough wind
#

If you're not instantiating the pointer in baking and just want to avoid an archetype change you can use [ChunkSerializable] attribute

#

On the component

#

This will let you bake components with pointers. Just remember this pointer will be garbage until you set it at runtime and will near certainly cause a crash if you use it before then.

livid pilot
#

the loading entity scene failed error almost always means something bad happened in an adb worker

#

look for something like [Worker0] or [Worker1] errors in your editor log

ruby ingot
#

It turned out to be that NativeArray breaking it all. I tried adding the [ChunckSerializable] but it didn't work for some reason. I ended up removing the NativeArray from the WorldProperties and made a Rules component data (with one Value property pointing to the NativeArray) instead that i would create in a system - my other systems needing that component would wait because of the [RequireMatchingQueriesForUpdate] attribute on them