public void Create_NullCollisions_DefaultComponents() { var parent = new GameObject("Parent").transform; var collisions = UrdfCollisionsExtensions.Create(parent); Assert.IsNotNull(collisions); Assert.IsNotNull(collisions.GetComponent <UrdfCollisions>()); Object.DestroyImmediate(parent.gameObject); }
public void ExportCollisionsData_DefaultGeometry_DefaultComponents(Geometry geometryBox) { var parent = new GameObject("Parent").transform; var collisions = UrdfCollisionsExtensions.Create(parent, new List <Collision>() { new Collision(geometryBox) }); var urdfColl = collisions.GetComponent <UrdfCollisions>(); Assert.IsTrue(urdfColl.ExportCollisionsData().Count > 0); Object.DestroyImmediate(parent.gameObject); }
public void Create_WithCollisions_DefaultComponents(Geometry geometryBox) { var parent = new GameObject("Parent").transform; var collisions = UrdfCollisionsExtensions.Create(parent, new List <Collision>() { new Collision(geometryBox) }); Assert.IsNotNull(collisions); Assert.IsTrue(parent.GetComponentsInChildren <UrdfCollisions>().Length > 0); Object.DestroyImmediate(parent.gameObject); }