Skip to content

Missing script and Serialization layout errors in built products [USDU-487] #412

@joshbaran

Description

@joshbaran

When running a built product, there are many warnings and errors in the log while loading. This has been reported before, but those issues are 3 years old, so I thought I'd start a new one instead of reopening those.

This happens on a project that uses Import as GameObjects. I have not tried the other import options. Everything works without errors in the Unity Editor, but if you run a product of a build, It looks like it reports this warning and error for every imported GameObject:
`[Warning] The referenced script on this Behaviour (Game Object 'Cylinder_005') is missing! (build.framework.js.gz, line 10)

[Error] A scripted object (script unknown or not yet loaded) has a different serialization layout when loading. (Read 32 bytes but expected 64 bytes)
Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

_JS_Log_Dump (build.framework.js.gz:10:36497)
wasm-stub
<?>.wasm-function[903]
<?>.wasm-function[23245]
<?>.wasm-function[23241]
<?>.wasm-function[23239]
<?>.wasm-function[16290]
<?>.wasm-function[16289]
<?>.wasm-function[20540]
<?>.wasm-function[20547]
<?>.wasm-function[16963]
<?>.wasm-function[16980]
<?>.wasm-function[16981]
<?>.wasm-function[23360]
<?>.wasm-function[23365]
wasm-stub
(anonymous function) (build.framework.js.gz:10:280926)
callMain (build.framework.js.gz:10:321846)
doRun (build.framework.js.gz:10:322288)
run (build.framework.js.gz:10:322457)
runCaller (build.framework.js.gz:10:321495)
removeRunDependency (build.framework.js.gz:10:16967)
(anonymous function) (build.framework.js.gz:10:1933)
doCallback (build.framework.js.gz:10:91430)
done (build.framework.js.gz:10:91586)
(anonymous function) (build.framework.js.gz:10:85236)`

The app still runs, and the objects are loaded and visible, however those warnings and errors appear. I am also experiencing intermittent crashes while loading the WebGL app saying A problem repeatedly occurred on ... that I think might be caused by so many errors appearing, but I don't know for sure.

It happens in iOS and WebGL. I have not tried any other platforms. I have also tried the ImportMesh sample and it also produces these errors.

I'm using Unity 2022.3.5f1 Intel on a MacBook Pro M2 Max
I installed the USD package by name com.unity.formats.usd and it is version 3.0.0-exp.4

Here is a GitHub repo of a project to reproduce the errors: https://github.com/Process-Solutions-Group/SerializationBugReport

Here is a hosted WebGL build of that project: https://pages.myblendedlearning.org/sites/usdtest/

I'm willing to help with debugging/fixing, if someone can help point me to the right places to start looking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions