Author Topic: MemoryStream loading error when putting ScrollView components in a prefab  (Read 4684 times)

Lagrange

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
  1. The file "MemoryStream" is corrupted! Remove it and launch unity again! [Position out of bounds! 20 > 16]

I've been getting the above error when trying to load Unity, and I've tracked down the cause to UIScrollView and UIDragScrollView.  When simply put into the UI and reloading the scene, those components work fine.  When I apply prefab to that UI and reload, I get the above error.  If I remove those two scripts, apply prefab, and reload, I can load the scene successfully.

I've read that this might only happen if version control is set to "Force Text", which I need to have for Git.

After removing both components and getting my scene into working order (and backed up), I've tried right clicking my UIPanel and attaching scroll view.  After doing this and applying the prefab, reloading will give this error.


*edit* some additional info:

Here's some of the info from the actual prefab file.  Adding the scroll view component changes the gameObject to add the (bolded)component line:
  1. GameObject:
  2.   m_ObjectHideFlags: 1
  3.   m_PrefabParentObject: {fileID: 0}
  4.   m_PrefabInternal: {fileID: 100100000}
  5.   serializedVersion: 4
  6.   m_Component:
  7.   - 4: {fileID: 400514}
  8.   - 114: {fileID: 11400572}
  9.   - 54: {fileID: 5400024}
  10.  [b] - 114: {fileID: 11400594}[/b]
  11.   m_Layer: 8
  12.   m_Name: ScrollPanel
  13.   m_TagString: Untagged
  14.   m_Icon: {fileID: 0}
  15.   m_NavMeshLayer: 0
  16.   m_StaticEditorFlags: 0
  17.   m_IsActive: 1

and adds the below section describing that component:
  1. --- !u!114 &11400594
  2. MonoBehaviour:
  3.   m_ObjectHideFlags: 1
  4.   m_PrefabParentObject: {fileID: 0}
  5.   m_PrefabInternal: {fileID: 100100000}
  6.   m_GameObject: {fileID: 100514}
  7.   m_Enabled: 1
  8.   m_EditorHideFlags: 0
  9.   m_Script: {fileID: 0}
  10.   m_Name:
  11.   m_EditorClassIdentifier:
  12.   movement: 1
  13.   dragEffect: 2
  14.   restrictWithinPanel: 1
  15.   disableDragIfFits: 0
  16.   smoothDragStart: 1
  17.   iOSDragEmulation: 1
  18.   scrollWheelFactor: .25
  19.   momentumAmount: 35
  20.   horizontalScrollBar: {fileID: 0}
  21.   verticalScrollBar: {fileID: 11400584}
  22.   showScrollBars: 1
  23.   customMovement: {x: 1, y: 0}
  24.   contentPivot: 0
  25.   scale: {x: 0, y: 0, z: 0}
  26.   relativePositionOnReset: {x: 0, y: 0}
« Last Edit: September 23, 2014, 12:11:03 PM by Lagrange »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: MemoryStream loading error when putting ScrollView components in a prefab
« Reply #1 on: September 23, 2014, 12:41:34 PM »
I've never seen that happen, but all I can suggest is submit it as a bug to Unity, as it's a problem with Unity's serialization.

Lagrange

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: MemoryStream loading error when putting ScrollView components in a prefab
« Reply #2 on: September 23, 2014, 01:19:34 PM »
I'll try that, and submit back here if I get a response