This commit is contained in:
CroakFang
2023-07-10 15:46:09 +08:00
parent b6f6267491
commit abb4d90a62
149 changed files with 21 additions and 11 deletions
@@ -0,0 +1,27 @@
using UnityEngine;
using UnityEditor;
namespace RootMotion.Dynamics {
/// <summary>
/// Converting 3D joints to ConfigurableJoints
/// </summary>
public class ConvertToConfigurableJoints: Editor {
/// <summary>
/// Converts any 3D joints on the selected Transform and it's children to ConfigurableJoints
/// </summary>
//[MenuItem ("Component/Physics/Convert to ConfigurableJoints")]
[MenuItem ("GameObject/Convert to ConfigurableJoints")]
public static void ConvertSelected() {
if (Selection.activeGameObject == null) {
Debug.Log("Please select the root of the ragdoll that you wish to convert to use ConfigurableJoints.");
return;
}
// @todo undo
JointConverter.ToConfigurable(Selection.activeGameObject);
}
}
}