Very odd but harmless error? *Not that urgent*

Hello guys! I’ve received an error that’s really odd for me. It says “MissingFieldException : UnityEngine.RigidbodyConstraints.freezePosition”, but it stills allows me to play the scene. Also, I’ve noticed that the error also says “Boo.lang.runtime.DynamicDispatching.PropertyDispatcherFactory.FindExtension(IEnumerable candidates)”, which is weird because I’m using JavaScript and not Boo at all. Doesn’t seem to be doing any significant harm to my game though, I’m just curious. Here’s the code that’s affecting it:

function Update ()
{
  rigidbody.constraints = rigidbody.constraints.freezePosition; 
}

RigidbodyConstraints is the type if rigidbody.constraints. It is quite literally just a “flag” variable, ie. 8 bits of booleans, for rotational and positional constraints.

What you’re doing is confusing both instance and static variables, but also using the wrong name.

From the documentation, it’s RigidbodyConstraints.FreezePosition (with a capitol), read the documentation for constraints here and here