コード例 #1
0
        private bool CheckCollision(GameObject obj1, GameObject obj2)
        {
            PolygonCollider col1 = obj1.Collider;
            PolygonCollider col2 = obj2.Collider;

            if (col1 == null || col2 == null || col1 == col2)
            {
                return(false);
            }

            return(PolygonCollider.CheckCollision(obj1, col1, obj2, col2));
        }