Hi,
I encounter a weird issue where I can't set the connectedBody of a configurable joint in my script.
I get the following:
MissingFieldException: Field 'UnityEngine.ConfigurableJoint.connectedBody' not found. Boo.Lang.Runtime.PropertyDispatcherFactory.EmitPropertyDispatcher (System.Reflection.PropertyInfo property, SetOrGet gos) Boo.Lang.Runtime.PropertyDispatcherFactory.EmitDispatcherFor (System.Reflection.MemberInfo info, SetOrGet gos) Boo.Lang.Runtime.PropertyDispatcherFactory.Create (SetOrGet gos) Boo.Lang.Runtime.PropertyDispatcherFactory.CreateSetter () Boo.Lang.Runtime.RuntimeServices.DoCreatePropSetDispatcher (System.Object target, System.Type type, System.String name, System.Object value) Boo.Lang.Runtime.RuntimeServices.CreatePropSetDispatcher (System.Object target, System.String name, System.Object value) Boo.Lang.Runtime.RuntimeServices+<>c_DisplayClass13.b_12 () Boo.Lang.Runtime.DispatcherCache.Get (Boo.Lang.Runtime.DispatcherKey key, Boo.Lang.Runtime.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.Dispatch (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, System.Object[] args, Boo.Lang.Runtime.DispatcherFactory factory) [0x00000] Boo.Lang.Runtime.RuntimeServices.Dispatch (System.Object target, System.String cacheKeyName, System.Object[] args, Boo.Lang.Runtime.DispatcherFactory factory) [0x00000] Boo.Lang.Runtime.RuntimeServices.SetProperty (System.Object target, System.String name, System.Object value) rig builder.Awake () (at Assets/rig builder.js:19)
What is really weird is that in the project view in my prefab, using the inspector doesn't work neither I get the list of available nodes I can select but nothing is actually set and connectedBody fields remains empty. There is only one way and it's in the scene itself, but that defeats the purpose of setting it up.
Any help or advice is welcome. Here is the script in question just in case.
function Awake(){
var frame = GameObject.Find("physics_frame_tracks");
var frame_colliderComp = frame.AddComponent(BoxCollider);
var frame_rigidbodyComp = frame.AddComponent(Rigidbody);
frame_rigidbodyComp.isKinematic = true;
var bodyRB = GameObject.Find("physics_body");
var body_colliderComp = bodyRB.AddComponent(MeshCollider);
body_colliderComp.convex = true;
var body_rigidbodyComp = bodyRB.AddComponent(Rigidbody);
var frame_joint = frame.AddComponent(ConfigurableJoint);
frame_joint.connectedBody = bodyRB; // !!!!!error here!!!!
note that ALL the other properties of the configurableJoint can be set properly without problem in this script too,
Thanks for your help,
Jean