on a gameObject with several children, all of which have a Rigidbody2D component, I want to enable (or disable) the “Simulated” property on the Rigidbody2D, using:
motherGameObject.GetComponentsInChildren<Rigidbody2D>().simulated=true;
I get the error:
Type UnityEngine.Rigidbody2D[]' does not contain a definition for
simulated’ and no extension method simulated' of type
UnityEngine.Rigidbody2D[]’ could be found. Are you missing an assembly reference?
what am I doing wrong? Thanks for reading!