|
hi, I have a weird problem. I sometimes need to import Blender Shape keys into Unity, and I always used MetaMorph developed by Foolish Frost without problem. In one recent project, however, I got tons of compiling errors. I finally got around by modifying an old project with a working MetaMorph script into the new one. But the problem kept gnaw at me and I feel uneasy not knowing what's wrong. I included both the error messages from one function and the corresponding function definition below. Hopefully someone can tell me what's wrong. Jason -----CompilerOutput:-stderr---------- -----EndCompilerOutput--------------- - Finished compile Library/ScriptAssemblies/Assembly-UnityScript-firstpass.dll Assets/Standard Assets/Scripts/MetaMorph.js(311,74): BCE0019: 'length' is not a member of 'Object'. (Filename: Assets/Standard Assets/Scripts/MetaMorph.js Line: 311) Assets/Standard Assets/Scripts/MetaMorph.js(313,96): BCE0048: Type 'Object' does not support slicing. (Filename: Assets/Standard Assets/Scripts/MetaMorph.js Line: 313) Assets/Standard Assets/Scripts/MetaMorph.js(318,98): BCE0048: Type 'Object' does not support slicing. (Filename: Assets/Standard Assets/Scripts/MetaMorph.js Line: 318) Assets/Standard Assets/Scripts/MetaMorph.js(329,70): BCE0004: Ambiguous reference 'parseFloat': UnityScript.Lang.UnityBuiltins.parseFloat(double), UnityScript.Lang.UnityBuiltins.parseFloat(int), UnityScript.Lang.UnityBuiltins.parseFloat(String), UnityScript.Lang.UnityBuiltins.parseFloat(float). (Filename: Assets/Standard Assets/Scripts/MetaMorph.js Line: 329) Assets/Standard Assets/Scripts/MetaMorph.js(331,97): BCE0048: Type 'Object' does not support slicing. (Filename: Assets/Standard Assets/Scripts/MetaMorph.js Line: 331) Assets/Standard Assets/Scripts/MetaMorph.js(336,101): BCE0004: Ambiguous reference 'parseFloat': UnityScript.Lang.UnityBuiltins.parseFloat(double), UnityScript.Lang.UnityBuiltins.parseFloat(int), UnityScript.Lang.UnityBuiltins.parseFloat(String), UnityScript.Lang.UnityBuiltins.parseFloat(float). (Filename: Assets/Standard Assets/Scripts/MetaMorph.js Line: 336) Assets/Standard Assets/Scripts/MetaMorph.js(369,66): BCE0048: Type 'Object' does not support slicing.
(comments are locked)
|
|
All of the error messages you posted are really the same problem appearing in different forms. The problem is that the standard array class doesn't return an array, an animation, a String, a number, or anything really usable. It returns a generic Object. The only thing the program knows about this object that it's a packet of data in Unity. Not terribly useful. Here's my recomendations:
For example, if you want to work with a 2-d Array of Strings, try this: If you replace Every instance of the Array() class with a builtInArray[], then your problems should go away.
(comments are locked)
|
