Skip to content
12 changes: 12 additions & 0 deletions Editor/AGXUnityEditor/Menus/TopMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ private static GameObject CreateShape<T>( MenuCommand command )
return null;

var parent = command.context as GameObject;
var views = SceneView.sceneViews;
if ( parent != null )
go.transform.SetParent( parent.transform, false );
else if ( SceneView.sceneViews.Count > 0 ) {
var view = SceneView.sceneViews[0] as SceneView;
if ( view != null )
view.MoveToView( go.transform );
}

AGXUnity.Rendering.ShapeVisual.Create( go.GetComponent<T>() );

Expand Down Expand Up @@ -576,6 +582,12 @@ public static void ConvertRenderingMaterials()
Windows.ConvertMaterialsWindow.Open();
}

[MenuItem( "AGXUnity/Utils/Convert PhysX components to AGX", priority = 80 )]
public static void ConvertPhysXToAGX()
{
Windows.ConvertPhysXToAGXWindow.Open();
}

[MenuItem( "AGXUnity/Settings...", priority = 81 )]
public static void OpenSettings()
{
Expand Down
Loading
Loading