- Home /
Question by
SmooveB · Mar 15, 2013 at 12:07 AM ·
errorflashhingejointpublish
Modifying values on HingeJoints throwing errors when compiling for flash
Trying to publish my game to flash using the flash preview in 3.5 to see if I should spend the money on the Unity 4 flash plug in. The only thing that is giving me problems (other than IO stuff which is expected) is, every time I try to modify a value on a hinge joint, I get this error during compile:
Copy\Temp\StagingArea\Data\ConvertedDotNetCode\global\WeaponSelectScreen.as(608): col: 242 Warning: Migration issue: * is not a dynamic class. Instances cannot have members added to them dynamically.
Here are two examples:
newWeapon.transform.Find("WeaponBody").GetComponent(HingeJoint).connectedBody=location.transform.parent.rigidbody;
Becomes:
(this.WeaponSelectScreen$newWeapon$.transform.Transform_Find_String("WeaponBody").Component_GetComponent_Type(HingeJoint.$Type) as HingeJoint).Joint_connectedBody_Rigidbody = ($array2.elements[$j] as GameObject).transform.parent.Component_rigidbody;
And
leftHandAttachPoint.GetComponentInChildren(HingeJoint).breakForce=0;
Becomes:
(this.WeaponSelectScreen$leftHandAttachPoint$.GameObject_GetComponentInChildren_Type(HingeJoint.$Type) as HingeJoint).Joint_breakForce_Single = Number(0);
What is wrong here? Is this fixed in unity 4? Is there a work around or some programming I can do to fix this in actionscript (I don't know jack about actionsript)?
Comment