public CustomPhysicsShape GetPhysicsShape() { if (customPhysicsShape == null) { customPhysicsShape = SpriteAtlasManager.RequesCustomShape(originalSprite); } return(customPhysicsShape); }
public List <Polygon2D> GetShapePolygons() { if (shapePolygons == null) { shapePolygons = new List <Polygon2D>(); if (originalSprite == null) { return(shapePolygons); } #if UNITY_2018_1_OR_NEWER if (customPhysicsShape == null) { customPhysicsShape = SpriteAtlasManager.RequesCustomShape(originalSprite); } shapePolygons = customPhysicsShape.GetShape(); #endif } return(shapePolygons); }