Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A scripted object has a different serialization layout when loading #410

Open
broseidon91 opened this issue Jan 12, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@broseidon91
Copy link

broseidon91 commented Jan 12, 2022

When building for Android, I get these runtime errors

The referenced script (Unknown) on this Behaviour is missing!
01-12 15:38:38.207 16650 16788 W Unity : The referenced script on this Behaviour (Game Object '') is missing!
01-12 15:38:38.207 16650 16788 E Unity : A scripted object (probably Unity.StreamingImageSequence.StreamingImageSequencePlayableAsset?) has a different serialization layout when loading. (Read 68 bytes but expected 1168 bytes)
01-12 15:38:38.207 16650 16788 E Unity : Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
01-12 15:38:38.207 16650 16788 W Unity : The referenced script (Unknown) on this Behaviour is missing!
01-12 15:38:38.207 16650 16788 W Unity : The referenced script on this Behaviour (Game Object '') is missing!
01-12 15:38:38.207 16650 16788 E Unity : A scripted object (probably Unity.StreamingImageSequence.StreamingImageSequenceTrack?) has a different serialization layout when loading. (Read 64 bytes but expected 2832 bytes)
01-12 15:38:38.207 16650 16788 E Unity : Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
01-12 15:38:38.326 16650 16788 W Unity : The referenced script (Unity.StreamingImageSequence.StreamingImageSequenceRenderer) on this Behaviour is missing!
01-12 15:38:38.328 16650 16788 W Unity : The referenced script on this Behaviour (Game Object 'Image') is missing!
01-12 15:38:38.328 16650 16788 E Unity : A scripted object (probably Unity.StreamingImageSequence.StreamingImageSequenceRenderer?) has a different serialization layout when loading. (Read 32 bytes but expected 52 bytes)
01-12 15:38:38.328 16650 16788 E Unity : Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?

I was able to reproduce this in a new project using Unity 2020.3.23f1 and SreamingImageSequence 0.14.2-preview

  1. Create a new project (2020.3.23f1)
  2. Add StreamingImageSequence package to the project (v0.14.2-preview) via git
  3. Add your PNG sequence into a new folder in the project (notably, not in streaming assets)
  4. Create a canvas object in your scene. Create a child gameobject of that canvas and add an Image component
  5. On the canvas, add a PlayableDirector component
  6. Open the Timeline window and select the Canvas. When prompted to create an asset, do so.
  7. Drag your PNG sequence folder into the timeline (or create a Streaming Image Sequence track)
  8. Drag the gameobject with the image component into the track's Streaming Image Sequence Renderer reference. It will add the component and attach the reference.
  9. Make sure your build settings indicate Android
  10. Build to device
  11. Open terminal and type adb logcat -s Unity and witness the errors
  12. the sequence will not play
@sindharta
Copy link
Contributor

Thank you for the report.

Just to let you know though, playing non-StreamingAssets images in runtime is not supported yet.

@sindharta-tanuwijaya sindharta-tanuwijaya added the enhancement New feature or request label Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants