Quantcast
Channel: Questions in topic: "unity3.5"
Viewing all articles
Browse latest Browse all 122

Flash: The file 'MemoryStream' is corrupted! when Instantiate CharacterMotor

$
0
0
Hi, I'm having a problem with the flash export in Unity 3.5 When running the game in the flash content debugger and I try and Instantiate a prefab containing a CharacterMotor component I get this message.
The file 'MemoryStream' is corrupted! Remove it and launch unity again!
[Position out of bounds!]
LogCallStackError
	at com.unity::UnityNative$/Ext_Flash_LogCallstack()
	at com.unity::UnityNative$/_Z17DebugStringToFilePKciS0_iiii()
	at com.unity::UnityNative$/_ZN12CachedReader16OutOfBoundsErrorEjj()
	at com.unity::UnityNative$/_ZN12CachedReader4ReadEPvj()
	at com.unity::UnityNative$/_ZN18StreamedBinaryReadILb0EE21TransferSTLStyleArrayI13dynamic_arrayI11KeyframeTplIfEEEEvRT_17TransferMetaFlags()
	at com.unity::UnityNative$/ReadAnimationCurveAndReturnPtr()
	at UnityEngine.Serialization::SerializedStateReader/ReadAnimationCurve()
	at global::CharacterMotorMovement/Deserialize()[C:\Users\Gick\Development\Unity Projects\FlashTest\Temp\StagingArea\Data\ConvertedDotNetCode\global\CharacterMotorMovement.as:66]
	at UnityEngine.Serialization::SerializedStateReader/ReadIDeserializable()
	at global::CharacterMotor/Deserialize()[C:\Users\Gick\Development\Unity Projects\FlashTest\Temp\StagingArea\Data\ConvertedDotNetCode\global\CharacterMotor.as:369]
	at UnityEngine.Serialization::ActionScriptDeserializer$/Deserialize()
	at com.unity::UnityNative$/Ext_DeserializeMonoBehaviour()
	at com.unity::UnityNative$/_ZN13MonoBehaviour23VirtualRedirectTransferER18StreamedBinaryReadILb0EE()
	at com.unity::UnityNative$/_ZL15CloneObjectImplP6ObjectR10vector_mapIllSt4lessIlE13stl_allocatorISt4pairIllEL18MemLabelIdentifier93ELi4EEE()
	at com.unity::UnityNative$/Object_CUSTOM_Internal_CloneSingle()
	at UnityEngine::_Object$/Object_Internal_CloneSingle_Object()
	at UnityEngine::_Object$/Object_Instantiate_Object()
	at global::Spawner/Spawner_Update()[C:\Users\Gick\Development\Unity Projects\FlashTest\Temp\StagingArea\Data\ConvertedDotNetCode\global\Spawner.as:22]
	at com.unity::UnityNative$/Ext_Flash_InvokeMethodOnObject()
	at com.unity::UnityNative$/_ZN13MonoBehaviour16CallUpdateMethodEi()
	at com.unity::UnityNative$/_ZN13MonoBehaviour6UpdateEv()
	at com.unity::UnityNative$/_ZN20BaseBehaviourManager12CommonUpdateI16BehaviourManagerEEvv()
	at com.unity::UnityNative$/_ZN16BehaviourManager6UpdateEv()
	at com.unity::UnityNative$/_Z10PlayerLoopbb()
	at com.unity::UnityNative$/NativeExt_PlayerLoop()
	at com.unity::UnityContentInternal/playerLoop()
	at com.unity::UnityContent/onEnterFrame()
I'm planning on getting round it for now by creating all of the required CharacterMotor containing objects in the editor and then enabling them at run time but I would like a better solution. Thanks in advance. n.b. I've tried this in both c# and js, using the flash content debugger 11.2. I've also created an example project (download [here][1]) showing the problem, you will need to build a swf and then run it in the content debugger... [1]: http://dl.dropbox.com/u/33891656/FlashTest.rar

Viewing all articles
Browse latest Browse all 122

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>