Skip to content

Conversation

@jokimmortal
Copy link
Contributor

First version of conversion tool

@jokimmortal jokimmortal requested a review from FilipAlg December 5, 2024 12:28
Copy link
Contributor

@FilipAlg FilipAlg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some suggestions for using unity utilities where possible. Formatting seems to fail, you can try running dotnet format whitespace --folder . in the AGXUnity dir to replicate this, most likely due to it not running with any defines.

I've also recently added support for Unity Test Framework so it would be great if you could add some test cases to verify that everything is working properly

ConvertObjects( m_physXAssets );
}

using ( new UndoCollapseBlock( "Convert Selected Prefab Assets" ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested that this works with immutable and/or nested prefabs?


newObject.isStatic = asset.gameObject.isStatic;

var colliderScale = asset.gameObject.transform.lossyScale;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me that this works in all cases, have you tried with nested scales and/or rotated objects at different nesting levels?

Comment on lines +892 to +895
Mesh readableMesh = new Mesh();
readableMesh.vertices = physXMesh.sharedMesh.vertices;
readableMesh.triangles = physXMesh.sharedMesh.triangles;
agxMesh.AddSourceObject( readableMesh );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this case work across reloads and such? I vaguely remember trying something similar and it not yielding the desired results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants