Forum

This forum is for swapping tips or ideas with fellow users, suggesting new features, or showing of what you have created with the system etc, there is no guarantee of an answer to questions posted in the forum. All support questions must be submitted via the Support ticket system

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: strange exceptions at runtime
gekido
Newbie
Posts: 2
Permalink
Post strange exceptions at runtime
on: December 10, 2012, 20:41
Quote

Hello,

Recently we started getting some strange errors with Megafiers. Not sure if this is due to an update of megafiers (I may have done one) or whether it has to do with migrating to Unity 4 (which I also did).

Basically at runtime, I get a number of errors in the megafiers system:

First error:
=======================
Mesh.vertices is too small. The supplied vertex array has less vertices than are referenced by the triangles array.
UnityEngine.Mesh:set_vertices(Vector3[])
MegaModifiers:SetMesh(Vector3[]&) (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifiers.cs:409)
MegaModifiers:ModifyObject() (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifiers.cs:380)
MegaModifiers:ModifyObjectMT() (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifiers.cs:695)
MegaModifyObject:Update() (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifyObject.cs:148)

Second Error (result of the error above)
=======================
IndexOutOfRangeException: Array index is out of range.
MegaModifiers.RecalcNormals (UnityEngine.Mesh ms, UnityEngine.Vector3[] _verts) (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifiers.cs:1026)
MegaModifiers.RecalcNormals () (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifiers.cs:454)
MegaModifiers.SetMesh (UnityEngine.Vector3[]& _verts) (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifiers.cs:417)
MegaModifiers.ModifyObject () (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifiers.cs:380)
MegaModifiers.ModifyObjectMT () (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifiers.cs:695)
MegaModifyObject.Update () (at Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaModifyObject.cs:148)

The strange thing about this is that the morphs DO work in the editor - I can manipulate all of the morphs in the editor fine. I have also rebuilt the prefabs that I'm working with (imported the .mor file) etc and megafiers takes it all fine, except when I run the game, at which point it spits out the above errors.

Is this a Unity 4 issue or something else that might be occuring?

Ideas?

spookycat
Administrator
Posts: 148
Permalink
Post Re: strange exceptions at runtime
on: December 10, 2012, 21:04
Quote

Hi There
I think you will have to reload the morph data, Unity 4 does different things when building its vertex info so the mapping data is no longer valid and vertex counts etc have likely changed depending on whether Unity has turned the mesh into strips etc. So try reloading the morph data and see if that fixes it, we had a report of the same problem in an early Unity 4.0 beta and reloading fixed it then.
Chris

gekido
Newbie
Posts: 2
Permalink
Post Re: strange exceptions at runtime
on: December 10, 2012, 22:51
Quote

yeah that was the problem - rebuild the prefabs from scratch and it cleared it up. strange, thought i had done that already

cheers!

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.019 seconds.