Unity-Technologies / URDF-Importer

URDF importer
Apache License 2.0
219 stars 71 forks source link

Missing `Constraints` field in RigidBody inspector #75

Closed Th-Havy closed 3 years ago

Th-Havy commented 3 years ago

Hi,

The custom inspector implemented in this package for rigidbodies is not showing the rigidbody constraints. This is quite annoying, as the only way to set the constraints is then to use scripts. image Default rigidbody inspector

image Custom rigidbody inspector missing the constraint options

A quick workaround is to modify the custom editor as follows:

// Insert at line 16 of RigidvodyEditor.cs
_rigidbody.constraints = (RigidbodyConstraints)EditorGUILayout.EnumFlagsField("Constraints", _rigidbody.constraints);

However, please note that this will not produce the original formatting, but the one below. Maybe you guys can get the original formatting from the original rigidbody inspector source code. image

hyounesy commented 3 years ago

Thank you @Th-Havy for bringing this to our attention and suggesting this feature. We have added a ticket to investigate a proper approach to add this to the custom inspector. [ticket#: AIRO-598]

at669 commented 3 years ago

Hi @Th-Havy, sorry for the late reply--I believe this issue was resolved with the URDF-Importer v0.3.0 update, which removed the custom editor for Rigidbodies (however, we are now on v0.4.0, which I suggest updating to!). Sorry for the inconvenience. I will close this ticket as the issue has been resolved, but feel free to reopen it if the issue persists. Thanks!