{"id":1348,"date":"2025-04-26T00:00:13","date_gmt":"2025-04-25T16:00:13","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/"},"modified":"2025-04-26T00:00:13","modified_gmt":"2025-04-25T16:00:13","slug":"unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/","title":{"rendered":"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b"},"content":{"rendered":"<div class=\"article_content clearfix\" id=\"article_content\">\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/kdoc_html_views-1a98987dfd.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/ck_htmledit_views-704d5b9767.css\" rel=\"stylesheet\"\/>\n<div class=\"markdown_views prism-atom-one-dark\" id=\"content_views\">\n  <svg style=\"display: none;\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n   <path d=\"M5,0 0,2.5 5,5z\" id=\"raphael-marker-block\" stroke-linecap=\"round\" style=\"-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\">\n   <\/path>\n  <\/svg><\/p>\n<h3>\n   <a id=\"_0\"><br \/>\n   <\/a><br \/>\n   \u77e5\u8bc6\u70b9\uff1a<br \/>\n  <\/h3>\n<ol>\n<li>\n    \u521a\u4f53\u7ec4\u4ef6\uff08rigidbody\uff09\uff0c\u53d7\u529b\u548c\u78b0\u649e\u7684\u7ec4\u4ef6\n   <\/li>\n<li>\n    \u89e6\u53d1\u5668\uff08Trigger\uff09\uff0c\u5f00\u542f\u540e\u7269\u4f53\u78b0\u649e\u6548\u679c\u53d6\u6d88\uff0c\u4f46\u4ecd\u4f1a\u8fd4\u56de\u78b0\u649e\u6d88\u606f\n   <\/li>\n<li>\n    \u590d\u5236\u7269\u4f53\u5bf9\u8c61\uff1a<br \/>\n    <code><br \/>\n     var box = Instantiate(\u5bf9\u8c61);<br \/>\n    <\/code>\n   <\/li>\n<li>\n    \u8bbe\u7f6e\u5bf9\u8c61\u5750\u6807\u4f4d\u7f6e\uff1a<br \/>\n    <code><br \/>\n     box.transform.position = new Vector3(\u4e09\u7ef4\u5750\u6807\u70b9);<br \/>\n    <\/code>\n   <\/li>\n<li>\n    \u7ed8\u5236\u5149\u6807\uff1a\u7ed8\u5236\u662f\u4ece\u5de6\u4e0a\u89d2\u4e3a\u539f\u70b9\u5f00\u59cb\u7ed8\u5236\uff0c\u4e3a\u4e86\u5728\u51c6\u5fc3\u5c04\u51fb\uff0c\u5750\u6807\u70b9\u505a\u4e9b\u504f\u79fb\u3002<br \/>\n    <br \/>\n    <code><br \/>\n     Cursor.SetCursor(MyCursor, new Vector2(MyCursor.width \/ 2, MyCursor.height \/ 2), CursorMode.Auto);<br \/>\n    <\/code>\n   <\/li>\n<li>\n    \u5224\u65ad\u6309\u952e\uff1a<br \/>\n    <code><br \/>\n     Input.GetButtonDown(\u6309\u952e);<br \/>\n    <\/code>\n   <\/li>\n<li>\n    \u83b7\u53d6\u5c4f\u5e55\u5c04\u7ebf\u5bf9\u8c61\uff1a<br \/>\n    <code><br \/>\n     Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);<br \/>\n    <\/code>\n   <\/li>\n<li>\n    \u5224\u65ad\u5c04\u7ebf\u7684\u7269\u7406\u78b0\u649e\uff1a<br \/>\n    <br \/>\n    <code><br \/>\n     Physics.Raycast(\u5c04\u7ebf\u5bf9\u8c61,out \u78b0\u649e\u7269\u4f53, \u5c04\u7ebf\u6700\u957f\u8ddd\u79bb)<br \/>\n    <\/code><br \/>\n    <br \/>\n    <code><br \/>\n     Physics.Raycast(ray,out Hit, 50)<br \/>\n    <\/code>\n   <\/li>\n<li>\n    \u7ed9\u7269\u4f53\u901f\u5ea6\u3001\u65b9\u5411\uff1a\u5c04\u7ebf\u78b0\u649e\u5750\u6807\u548c\u5b50\u5f39\u5f53\u524d\u5750\u6807\u53ea\u5dee\u5f62\u6210\u4e00\u4e2a\u5411\u91cf\uff0c\u786e\u5b9a\u901f\u5ea6\u65b9\u5411\uff0c\u7136\u540e\u4e58\u4e0a\u901f\u5ea6\u5927\u5c0f<br \/>\n    <br \/>\n    <code><br \/>\n     \u7269\u4f53\u5bf9\u8c61.GetComponent&lt;Rigidbody&gt;().velocity = \u901f\u5ea6\u65b9\u5411 * \u901f\u5ea6\u5927\u5c0f;<br \/>\n    <\/code><br \/>\n    <br \/>\n    <code><br \/>\n     bullet.GetComponent&lt;Rigidbody&gt;().velocity = (Hit.point - bullet.transform.position) * 5;<br \/>\n    <\/code>\n   <\/li>\n<\/ol>\n<hr\/>\n<h3>\n   <a id=\"_17\"><br \/>\n   <\/a><br \/>\n   \u6b65\u9aa4\uff1a<br \/>\n  <\/h3>\n<ol>\n<li>\n<p>\n     \u51c6\u5907\u7269\u4f53\u548c\u5b50\u5f39\u3001\u5730\u677f\uff0c\u7269\u4f53\u548c\u5b50\u5f39\u5b58\u50a8\u5bf9\u8c61\u540e\uff0c\u5c31\u53ef\u4ee5\u5220\u6389<br \/>\n     <br \/>\n     \u5b50\u5f39\u548c\u7269\u4f53\u90fd\u8981\u6dfb\u52a0\u521a\u4f53\u7ec4\u4ef6<br \/>\n     \n    <\/p>\n<\/li>\n<li>\n<p>\n     \u521b\u5efaGameObject\u5bf9\u8c61\uff0c\u5b58\u50a8\u811a\u672c<br \/>\n     \n    <\/p>\n<\/li>\n<li>\n<p>\n     \u8bbe\u7f6e\u5bf9\u8c61\u53d8\u91cf\uff0c\u628a\u7269\u4f53\u5bf9\u8c61\u8d4b\u503c\u7ed9\u53d8\u91cf<br \/>\n     \n    <\/p>\n<\/li>\n<li>\n<p>\n     \u8bbe\u7f6eQuad\u5899\u4f53\uff0c\u8fd9\u6837\u9f20\u6807\u70b9\u51fb\u4efb\u4f55\u4f4d\u7f6e\u90fd\u4f1a\u89e6\u53d1\u5c04\u7ebf\u78b0\u649e\u4e8b\u4ef6<br \/>\n     \n    <\/p>\n<\/li>\n<li>\n<p>\n     \u8bbe\u7f6e\u5149\u6807\uff0c\u627e\u4e00\u5f20\u900f\u660e\u5e95\u7684\u8d34\u56fe\uff0c\u8bbe\u7f6e\u6210\u5149\u6807\uff0c\u518d\u8d4b\u503c\u7ed9\u811a\u672c\u53d8\u91cf<br \/>\n     \n    <\/p>\n<\/li>\n<li>\n<p>\n     \u4f18\u5316\u9879\u76ee\uff1a\u5220\u9664\u6444\u50cf\u673a\u89c6\u91ce\u5916\u7684\u7269\u4f53\u5bf9\u8c61\uff0c\u8282\u7701\u8d44\u6e90\u3002\u5220\u9664\u811a\u672c\u6dfb\u52a0\u5728\u7269\u4f53\u5185\u3002<\/p>\n<p>\n    <\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\n   <a id=\"_41\"><br \/>\n   <\/a><br \/>\n   \u811a\u672c\u4ee3\u7801<br \/>\n  <\/h3>\n<p>\n   <strong><br \/>\n    HitPlayGame.cs<br \/>\n   <\/strong>\n  <\/p>\n<pre><code>public class HitPlayGame : MonoBehaviour\n{\n    \/\/\u7bb1\u5b50\n    public GameObject Box;\n    \/\/\u7403\u4f53\uff08\u5b50\u5f39\uff09\n    public GameObject Bullet;\n    \/\/\u5149\u6807\n    public Texture2D MyCursor;\n\n    \/\/ Start is called before the first frame update\n    void Start()\n    {\n        for(int i = 0; i &lt; 5; i++)\n        {\n            for(int j = 0; j &lt; 5; j++)\n            {\n                \/\/\u590d\u5236\u7269\u4f53\u5bf9\u8c61\uff0c\u5e76\u8fd4\u56de\u8be5\u7269\u4f53\u5bf9\u8c61\uff0c\u53c2\u6570\uff1a\u88ab\u590d\u5236\u7684\u5bf9\u8c61\n                var box = Instantiate(Box);\n                \n                \/\/\u8bbe\u7f6e\u7269\u4f53\u7684\u4f4d\u7f6e\n                box.transform.position = new Vector3(-2f+i, 0.5f+j, 4.5f);\n            }\n        }\n\n        \/\/\u7ed8\u5236\u5149\u6807\n        Cursor.SetCursor(MyCursor, new Vector2(MyCursor.width \/ 2, MyCursor.height \/ 2), CursorMode.Auto);\n    }\n\n    \/\/ Update is called once per frame\n    void Update()\n    {\n        \/\/\u6309\u4e00\u4e0b\u9f20\u6807\u5de6\u952e\uff0c\u53d1\u5c04\u4e00\u6b21\u5b50\u5f39\n        if (Input.GetButtonDown(\"Fire1\"))\n        {\n            \u590d\u5236\u7269\u4f53\u5bf9\u8c61\uff0c\u5e76\u8fd4\u56de\u8be5\u7269\u4f53\u5bf9\u8c61\uff0c\u53c2\u6570\uff1a\u88ab\u590d\u5236\u7684\u5bf9\u8c61\n            var bullet = Instantiate(Bullet);\n            \n            \/\/\u8bbe\u7f6e\u7269\u4f53\u7684\u4f4d\u7f6e\n            bullet.transform.position = Camera.main.transform.position;\n            \n            \/\/\u83b7\u53d6\u5c4f\u5e55\u5c04\u7ebf\u5bf9\u8c61\n            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);\n            \n            \/\/\u78b0\u649e\u7269\u4f53\u53d8\u91cf\n            RaycastHit Hit;\n            \n            \/\/\u5224\u65ad\u5c04\u7ebf\u662f\u5426\u6709\u78b0\u649e\u5bf9\u8c61\n            if(Physics.Raycast(ray,out Hit, 50))\n            {\n                \/\/\u7ed9\u5b50\u5f39\u5bf9\u8c61\u4e00\u4e2a\u65b9\u5411\u548c\u901f\u5ea6\n                bullet.GetComponent&lt;Rigidbody&gt;().velocity = (Hit.point - bullet.transform.position)*5;\n            }\n        }\n    }\n}\n<\/code><\/pre>\n<p>\n   <strong><br \/>\n    DestoryObj.cs<br \/>\n   <\/strong>\n  <\/p>\n<pre><code>public class DestoryObj : MonoBehaviour\n{\n    \/\/\/ &lt;summary&gt;\n    \/\/\/ \u8d85\u51fa\u6444\u50cf\u673a\u89c6\u91ce\u6267\u884c\n    \/\/\/ &lt;\/summary&gt;\n    private void OnBecameInvisible()\n    {\n        \/\/\u5220\u9664\u5bf9\u8c61\n        Destroy(gameObject);   \n    }\n}\n<\/code><\/pre>\n<\/p><\/div>\n<link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/markdown_views-a5d25dd831.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/style-e504d6a974.css\" rel=\"stylesheet\"\/>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u77e5\u8bc6\u70b9\uff1a \u521a\u4f53\u7ec4\u4ef6\uff08rigidbody\uff09\uff0c\u53d7\u529b\u548c\u78b0\u649e\u7684\u7ec4\u4ef6 \u89e6\u53d1\u5668\uff08Trigger\uff09\uff0c\u5f00\u542f\u540e\u7269\u4f53\u78b0\u649e\u6548\u679c\u53d6\u6d88\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-23"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-\u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u77e5\u8bc6\u70b9\uff1a \u521a\u4f53\u7ec4\u4ef6\uff08rigidbody\uff09\uff0c\u53d7\u529b\u548c\u78b0\u649e\u7684\u7ec4\u4ef6 \u89e6\u53d1\u5668\uff08Trigger\uff09\uff0c\u5f00\u542f\u540e\u7269\u4f53\u78b0\u649e\u6548\u679c\u53d6\u6d88\uff0c [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-\u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-25T16:00:13+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"260\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@wunen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@wunen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b\",\"datePublished\":\"2025-04-25T16:00:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/\"},\"wordCount\":10,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"articleSection\":[\"\u5c04\u51fb\u6e38\u620f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/\",\"url\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/\",\"name\":\"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-04-25T16:00:13+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#primaryimage\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"width\":260,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wunen.com\/#website\",\"url\":\"https:\/\/www.wunen.com\/\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"description\":\"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9\",\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wunen.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.wunen.com\/#organization\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"url\":\"https:\/\/www.wunen.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"width\":1024,\"height\":1024,\"caption\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\",\"name\":\"admin@wunen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"caption\":\"admin@wunen\"},\"sameAs\":[\"http:\/\/www.wunen.com\"],\"url\":\"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-\u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b\/","og_locale":"zh_CN","og_type":"article","og_title":"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u77e5\u8bc6\u70b9\uff1a \u521a\u4f53\u7ec4\u4ef6\uff08rigidbody\uff09\uff0c\u53d7\u529b\u548c\u78b0\u649e\u7684\u7ec4\u4ef6 \u89e6\u53d1\u5668\uff08Trigger\uff09\uff0c\u5f00\u542f\u540e\u7269\u4f53\u78b0\u649e\u6548\u679c\u53d6\u6d88\uff0c [&hellip;]","og_url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-\u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-04-25T16:00:13+00:00","og_image":[{"width":260,"height":180,"url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","type":"image\/jpeg"}],"author":"admin@wunen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin@wunen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#article","isPartOf":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/"},"author":{"name":"admin@wunen","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b","datePublished":"2025-04-25T16:00:13+00:00","mainEntityOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/"},"wordCount":10,"commentCount":0,"publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","articleSection":["\u5c04\u51fb\u6e38\u620f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/","url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/","name":"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"https:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#primaryimage"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-04-25T16:00:13+00:00","breadcrumb":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#primaryimage","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","width":260,"height":180},{"@type":"BreadcrumbList","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/26\/unity3d-%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e7%bb%83%e4%b9%a0%e5%ae%9e%e4%be%8b\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"Unity3D \u5c04\u51fb\u6e38\u620f\u7ec3\u4e60\u5b9e\u4f8b"}]},{"@type":"WebSite","@id":"https:\/\/www.wunen.com\/#website","url":"https:\/\/www.wunen.com\/","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","description":"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9","publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wunen.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.wunen.com\/#organization","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","url":"https:\/\/www.wunen.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","width":1024,"height":1024,"caption":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51"},"image":{"@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8","name":"admin@wunen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","caption":"admin@wunen"},"sameAs":["http:\/\/www.wunen.com"],"url":"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/"}]}},"_links":{"self":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/1348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/comments?post=1348"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/1348\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media\/215"}],"wp:attachment":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media?parent=1348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=1348"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=1348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}