Conversation
FilipAlg
left a comment
There was a problem hiding this comment.
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" ) ) { |
There was a problem hiding this comment.
Have you tested that this works with immutable and/or nested prefabs?
|
|
||
| newObject.isStatic = asset.gameObject.isStatic; | ||
|
|
||
| var colliderScale = asset.gameObject.transform.lossyScale; |
There was a problem hiding this comment.
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?
| Mesh readableMesh = new Mesh(); | ||
| readableMesh.vertices = physXMesh.sharedMesh.vertices; | ||
| readableMesh.triangles = physXMesh.sharedMesh.triangles; | ||
| agxMesh.AddSourceObject( readableMesh ); |
There was a problem hiding this comment.
Does this case work across reloads and such? I vaguely remember trying something similar and it not yielding the desired results
First version of conversion tool