{"id":2265,"date":"2025-05-15T06:00:16","date_gmt":"2025-05-14T22:00:16","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/"},"modified":"2025-05-15T06:00:16","modified_gmt":"2025-05-14T22:00:16","slug":"unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/","title":{"rendered":"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0"},"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=\"htmledit_views atom-one-dark\" id=\"content_views\">\n<p id=\"main-toc\">\n   <strong><br \/>\n    \u76ee\u5f55<br \/>\n   <\/strong>\n  <\/p>\n<p id=\"-toc\" style=\"margin-left:0px;\">\n<p id=\"%E4%B8%80%E3%80%81%E7%AE%80%E4%BB%8B-toc\" style=\"margin-left:0px;\">\n   <a href=\"#%E4%B8%80%E3%80%81%E7%AE%80%E4%BB%8B\" rel=\"nofollow\"><br \/>\n    \u4e00\u3001\u7b80\u4ecb<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1%E3%80%81%E6%B8%B8%E6%88%8F%E8%A7%84%E5%88%99-toc\" style=\"margin-left:80px;\">\n   <a href=\"#1%E3%80%81%E6%B8%B8%E6%88%8F%E8%A7%84%E5%88%99\" rel=\"nofollow\"><br \/>\n    1\u3001\u6e38\u620f\u89c4\u5219<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2%E3%80%81%E7%95%8C%E9%9D%A2UI-toc\" style=\"margin-left:80px;\">\n   <a href=\"#2%E3%80%81%E7%95%8C%E9%9D%A2UI\" rel=\"nofollow\"><br \/>\n    2\u3001\u754c\u9762UI<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3%E3%80%81%E6%8C%89%E9%94%AE%E8%AE%BE%E7%BD%AE-toc\" style=\"margin-left:80px;\">\n   <a href=\"#3%E3%80%81%E6%8C%89%E9%94%AE%E8%AE%BE%E7%BD%AE\" rel=\"nofollow\"><br \/>\n    3\u3001\u6309\u952e\u8bbe\u7f6e<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E4%BA%8C%E3%80%81%E5%85%B7%E4%BD%93%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:0px;\">\n   <a href=\"#%E4%BA%8C%E3%80%81%E5%85%B7%E4%BD%93%E5%AE%9E%E7%8E%B0\" rel=\"nofollow\"><br \/>\n    \u4e8c\u3001\u5177\u4f53\u5b9e\u73b0<br \/>\n   <\/a>\n  <\/p>\n<p id=\"1%E3%80%81%E5%9C%B0%E5%9B%BE%E8%AE%BE%E8%AE%A1-toc\" style=\"margin-left:40px;\">\n   <a href=\"#1%E3%80%81%E5%9C%B0%E5%9B%BE%E8%AE%BE%E8%AE%A1\" rel=\"nofollow\"><br \/>\n    1\u3001\u5730\u56fe\u8bbe\u8ba1<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2%E3%80%81%E7%8E%A9%E5%AE%B6%E8%A7%92%E8%89%B2%E8%AE%BE%E8%AE%A1-toc\" style=\"margin-left:40px;\">\n   <a href=\"#2%E3%80%81%E7%8E%A9%E5%AE%B6%E8%A7%92%E8%89%B2%E8%AE%BE%E8%AE%A1\" rel=\"nofollow\"><br \/>\n    2\u3001\u73a9\u5bb6\u89d2\u8272\u8bbe\u8ba1<br \/>\n   <\/a>\n  <\/p>\n<p id=\"a%E3%80%81%E8%B5%84%E6%BA%90%E5%AF%BC%E5%85%A5-toc\" style=\"margin-left:80px;\">\n   <a href=\"#a%E3%80%81%E8%B5%84%E6%BA%90%E5%AF%BC%E5%85%A5\" rel=\"nofollow\"><br \/>\n    a\u3001\u8d44\u6e90\u5bfc\u5165<br \/>\n   <\/a>\n  <\/p>\n<p id=\"b%E3%80%81%E7%8E%A9%E5%AE%B6%E7%A7%BB%E5%8A%A8%E5%92%8C%E8%A7%86%E8%A7%92%E8%AE%BE%E8%AE%A1-toc\" style=\"margin-left:80px;\">\n   <a href=\"#b%E3%80%81%E7%8E%A9%E5%AE%B6%E7%A7%BB%E5%8A%A8%E5%92%8C%E8%A7%86%E8%A7%92%E8%AE%BE%E8%AE%A1\" rel=\"nofollow\"><br \/>\n    b\u3001\u73a9\u5bb6\u79fb\u52a8\u548c\u89c6\u89d2\u8bbe\u8ba1<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A01%EF%BC%89%E3%80%81%E8%A7%86%E9%87%8E%E6%8E%A7%E5%88%B6-toc\" style=\"margin-left:120px;\">\n   <a href=\"#%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A01%EF%BC%89%E3%80%81%E8%A7%86%E9%87%8E%E6%8E%A7%E5%88%B6\" rel=\"nofollow\"><br \/>\n    1\uff09\u3001\u89c6\u91ce\u63a7\u5236<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A02%EF%BC%89%E3%80%81%E8%A7%92%E8%89%B2%E7%A7%BB%E5%8A%A8-toc\" style=\"margin-left:120px;\">\n   <a href=\"#%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A02%EF%BC%89%E3%80%81%E8%A7%92%E8%89%B2%E7%A7%BB%E5%8A%A8\" rel=\"nofollow\"><br \/>\n    2\uff09\u3001\u89d2\u8272\u79fb\u52a8<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0c%E3%80%81%E7%8E%A9%E5%AE%B6%E5%B0%84%E5%87%BB%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:80px;\">\n   <a href=\"#%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0c%E3%80%81%E7%8E%A9%E5%AE%B6%E5%B0%84%E5%87%BB%E5%AE%9E%E7%8E%B0\" rel=\"nofollow\"><br \/>\n    c\u3001\u73a9\u5bb6\u5c04\u51fb\u5b9e\u73b0<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A01%EF%BC%89%E3%80%81%E5%B0%84%E5%87%BB%E7%9A%84%E5%8A%A8%E7%94%BB%E7%8A%B6%E6%80%81%E6%9C%BA%E8%AE%BE%E7%BD%AE-toc\" style=\"margin-left:120px;\">\n   <a href=\"#%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A01%EF%BC%89%E3%80%81%E5%B0%84%E5%87%BB%E7%9A%84%E5%8A%A8%E7%94%BB%E7%8A%B6%E6%80%81%E6%9C%BA%E8%AE%BE%E7%BD%AE\" rel=\"nofollow\"><br \/>\n    1\uff09\u3001\u5c04\u51fb\u7684\u52a8\u753b\u72b6\u6001\u673a\u8bbe\u7f6e<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A02%EF%BC%89%E3%80%81%E5%B0%84%E5%87%BB%E8%84%9A%E6%9C%AC%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:120px;\">\n   <a href=\"#%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A02%EF%BC%89%E3%80%81%E5%B0%84%E5%87%BB%E8%84%9A%E6%9C%AC%E5%AE%9E%E7%8E%B0\" rel=\"nofollow\"><br \/>\n    2\uff09\u3001\u5c04\u51fb\u811a\u672c\u5b9e\u73b0<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%20%C2%A03%E3%80%81%E7%A7%BB%E5%8A%A8%E9%9D%B6%E5%92%8C%E5%9B%BA%E5%AE%9A%E9%9D%B6%E8%AE%BE%E8%AE%A1%C2%A0%20%C2%A0-toc\" style=\"margin-left:40px;\">\n   <a href=\"#%C2%A0%20%C2%A03%E3%80%81%E7%A7%BB%E5%8A%A8%E9%9D%B6%E5%92%8C%E5%9B%BA%E5%AE%9A%E9%9D%B6%E8%AE%BE%E8%AE%A1%C2%A0%20%C2%A0\" rel=\"nofollow\"><br \/>\n    3\u3001\u79fb\u52a8\u9776\u548c\u56fa\u5b9a\u9776\u8bbe\u8ba1<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%201%E3%80%81%E5%9B%BA%E5%AE%9A%E9%9D%B6%20%C2%A0%20%C2%A0-toc\" style=\"margin-left:80px;\">\n   <a href=\"#%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%201%E3%80%81%E5%9B%BA%E5%AE%9A%E9%9D%B6%20%C2%A0%20%C2%A0\" rel=\"nofollow\"><br \/>\n    1\u3001\u56fa\u5b9a\u9776<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%202%E3%80%81%E7%A7%BB%E5%8A%A8%E9%9D%B6%EF%BC%88Sheep%EF%BC%89%C2%A0%20%C2%A0%20%C2%A0-toc\" style=\"margin-left:80px;\">\n   <a href=\"#%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%202%E3%80%81%E7%A7%BB%E5%8A%A8%E9%9D%B6%EF%BC%88Sheep%EF%BC%89%C2%A0%20%C2%A0%20%C2%A0\" rel=\"nofollow\"><br \/>\n    2\u3001\u79fb\u52a8\u9776\uff08Sheep\uff09<br \/>\n   <\/a>\n  <\/p>\n<p>\n   \u9879\u76ee\u89c6\u9891\uff1a<br \/>\n   <a href=\"https:\/\/www.bilibili.com\/video\/BV1fFqaYXERi\/?spm_id_from=333.999.0.0\" rel=\"nofollow\" title=\"unity\u7b2c\u4e00\u4eba\u79f0\u8bbe\u8ba1\u6e38\u620f_\u5355\u673a\u6e38\u620f\u70ed\u95e8\u89c6\u9891\"><br \/>\n    unity\u7b2c\u4e00\u4eba\u79f0\u8bbe\u8ba1\u6e38\u620f_\u5355\u673a\u6e38\u620f\u70ed\u95e8\u89c6\u9891<br \/>\n   <\/a>\n  <\/p>\n<p>\n   \u9879\u76ee\u6e90\u7801\uff1a<br \/>\n   <a href=\"https:\/\/gitee.com\/ma-xinjing\/shooy\" rel=\"nofollow\" title=\"xiaoma\/ShootGame\"><br \/>\n    xiaoma\/ShootGame<br \/>\n   <\/a>\n  <\/p>\n<h2 id=\"%E4%B8%80%E3%80%81%E7%AE%80%E4%BB%8B\">\n   \u4e00\u3001\u7b80\u4ecb<br \/>\n  <\/h2>\n<p>\n   \u672c\u6b21\u5b9e\u9a8c\u4e3b\u8981\u5b9e\u73b0\u4e86\u7b2c\u4e00\u4eba\u79f0\u89c6\u89d2\u4e0b\u7684\u5c04\u51fb\u6e38\u620f\uff0c\u73a9\u5bb6\u901a\u8fc7\u952e\u76d8\u63a7\u5236\u89d2\u8272\u7684\u79fb\u52a8\u3001\u901a\u8fc7\u9f20\u6807\u63a7\u5236\u89c6\u91ce\u7684\u53d8\u5316\u548c\u5c04\u51fb\u6548\u679c\u5b9e\u73b0\u5bf9\u56fa\u5b9a\u9776\u548c\u79fb\u52a8\u9776\u7684\u5c04\u51fb\u3002\n  <\/p>\n<h4 id=\"1%E3%80%81%E6%B8%B8%E6%88%8F%E8%A7%84%E5%88%99\">\n   1\u3001\u6e38\u620f\u89c4\u5219<br \/>\n  <\/h4>\n<p>\n   \u73a9\u5bb6\u53ef\u4ee5\u5728\u6e38\u620f\u4e2d\u6709\u4e24\u79cd\u6b66\u5668\u53ef\u4ee5\u9009\u62e9\u5206\u522b\u662f\u67aa\u548c\u5f13\u5f29\u3002\n  <\/p>\n<p>\n   \u5f53\u521d\u59cb\u73a9\u5bb6\u9009\u62e9\u6b66\u5668\u4e3a\u67aa\u65f6\uff0c\u521d\u59cb\u73a9\u5bb6\u5f39\u5323\u4e2d\u88c5\u6ee131\u9897\u5b50\u5f39\u4ee5\u53ca60\u9897\u5907\u5f39\uff0c\u5f39\u5323\u7684\u5bb9\u91cf\u4e3a31\uff0c\u5f53\u5f53\u524d\u5f39\u5323\u5b50\u5f39\u6570\u91cf\u4e3a0\u65f6\u9700\u8981\u8fdb\u884c\u6362\u5f39\uff0c\u5f53\u5b50\u5f39\u5168\u90e8\u7528\u5c3d\u65f6\u73a9\u5bb6\u65e0\u6cd5\u7ee7\u7eed\u5c04\u51fb\u9700\u8981\u91cd\u65b0\u5f00\u59cb\u6e38\u620f\u3002\u5728\u6e38\u620f\u4e2d\u73a9\u5bb6\u53ef\u4ee5\u4f7f\u7528\u5b50\u5f39\u51fb\u4e2d\u4efb\u610f\u7269\u4f53\uff0c\u4f46\u662f\u53ea\u6709\u51fb\u4e2dTarget(\u56fa\u5b9a\u9776\u5b50\uff09\u6216\u8005Sheep(\u79fb\u52a8\u9776\uff09\u624d\u53ef\u4ee5\u83b7\u5f97\u76f8\u5e94\u7684\u5206\u6570\u3002\u5bf9\u4e8etarget\u53ea\u8981\u51fb\u4e2d\u5373\u53ef\u83b7\u5f971\u5206\uff0ctarget\u6ca1\u6709\u8bbe\u7f6e\u8840\u91cf\u56e0\u6b64\u4e0d\u4f1a\u88ab\u9500\u6bc1\u3002\u6bcf\u4e00\u4e2aSheep\u56fa\u5b9a\u67093\u70b9\u8840\u91cf\uff0c\u6bcf\u51fb\u4e2d\u4e00\u6b21\u53ef\u4ee5\u51cf\u5c11\u51761\u70b9\u8840\u91cf\uff0c\u5f53\u8840\u91cf\u4e3a0\u65f6\u8be5\u5bf9\u8c61\u4f1a\u88ab\u9500\u6bc1\u73a9\u5bb6\u83b7\u5f9710\u70b9\u5206\u6570\u3002\n  <\/p>\n<p>\n   \u5f53\u73a9\u5bb6\u521d\u59cb\u9009\u62e9\u5f13\u5f29\u65f6\u9700\u8981\u5148\u4f7f\u7528R\u6309\u952e\u88c5\u8f7d\u5f13\u7bad\uff0c\u901a\u8fc7\u9f20\u6807\u5de6\u952e\u8fdb\u884c\u84c4\u529b\u9f20\u6807\u53f3\u952e\u8fdb\u884c\u53d1\u5c04\u3002\u7531\u4e8e\u5f13\u5f29\u51fb\u4e2dSheep\u5bf9\u8c61\u7684\u96be\u5ea6\u6bd4\u8f83\u5927\u56e0\u6b64\u4e0d\u5bf9Sheep\u91c7\u53d6\u8840\u91cf\u800c\u662f\u76f4\u63a5\u51fb\u4e2d\u5373\u53ef\u5f97\u5206\u3002\n  <\/p>\n<h4 id=\"2%E3%80%81%E7%95%8C%E9%9D%A2UI\">\n   2\u3001\u754c\u9762UI<br \/>\n  <\/h4>\n<p>\n   \u6574\u4e2a\u754c\u9762\u5305\u62ec\u5de6\u4e0a\u89d2\u7684\u5206\u6570\u663e\u793aUI\u3001\u5de6\u4e0b\u89d2\u7684\u5b50\u5f39\u6570\u91cfUI\uff08\u5f39\u5323\u4e2d\u7684\u5b50\u5f39\u6570\u91cf\/\u5907\u5f39\u6570\u91cf\uff09\u3001\u67aa\u7684\u51c6\u5fc3\u4ee5\u53ca\u96c6\u4e2d\u9776\u5b50\u65f6\u7684\u63d0\u793aUI\u3002\u53f3\u4e0a\u89d2\u662f\u89d2\u8272\u79fb\u52a8\u7684\u5c0f\u5730\u56fe\uff0c\u4f1a\u6839\u636e\u89d2\u8272\u7684\u4f4d\u7f6e\u663e\u793a\u9644\u8fd1\u7684\u7269\u4f53\uff08\u73a9\u5bb6\u4ee5\u7ea2\u8272\u7403\u4f53\u6765\u663e\u793a\uff09\u5177\u4f53\u663e\u793a\u5982\u4e0b\u56fe\uff1a\n  <\/p>\n<\/p>\n<p style=\"text-align:center;\">\n   \u56fe1\u3001\u754c\u9762UI\u5c55\u793a\n  <\/p>\n<p style=\"text-align:center;\">\n<p style=\"text-align:center;\">\n   \u56fe2\u3001\u521d\u59cb\u6b66\u5668\u9009\u62e9\n  <\/p>\n<h4 id=\"3%E3%80%81%E6%8C%89%E9%94%AE%E8%AE%BE%E7%BD%AE\">\n   3\u3001\u6309\u952e\u8bbe\u7f6e<br \/>\n  <\/h4>\n<p>\n   \u901a\u7528\uff1a\n  <\/p>\n<p>\n   \u89c6\u89d2\uff1a\u901a\u8fc7\u9f20\u6807\u7684\u79fb\u52a8\u63a7\u5236\n  <\/p>\n<p>\n   \u884c\u8d70\uff1a\u901a\u8fc7w\u3001s\u3001a\u3001d\u63a7\u5236\u89d2\u8272\u7684\u4e0a\u4e0b\u5de6\u53f3\u79fb\u52a8\uff1b\n  <\/p>\n<p>\n   \u6b66\u5668\u5207\u6362\u83dc\u5355\uff1a Q\u6309\u952e\uff1b\n  <\/p>\n<p>\n   \u5954\u8dd1\uff1a\u901a\u8fc7\u5de6shift\u6309\u952e\u5b9e\u73b0\u89d2\u8272\u7684\u5954\u8dd1\uff1b\n  <\/p>\n<p>\n   \u8df3\u8dc3\uff1a\u901a\u8fc7\u7a7a\u683c\u6309\u952e\u5b9e\u73b0\u89d2\u8272\u7684\u8df3\u8dc3\uff1b\n  <\/p>\n<p>\n   \u6362\u5f39\uff1a \u901a\u8fc7R\u6309\u952e\u5b9e\u73b0\u6362\u5f39\uff1b\n  <\/p>\n<p>\n   \u6b66\u5668\u4e3a\u67aa\u65f6\uff1a\n  <\/p>\n<p>\n   \u7784\u51c6\uff1a \u6309\u4f4f\u9f20\u6807\u53f3\u952e\u8fdb\u5165\u7784\u51c6\u72b6\u6001\uff0c\u677e\u5f00\u9f20\u6807\u53f3\u952e\u9000\u51fa\u7784\u51c6\u72b6\u6001\uff1b\n  <\/p>\n<p>\n   \u5c04\u51fb\uff1a\u6309\u4e0b\u9f20\u6807\u5de6\u952e\u8fdb\u884c\u8bbe\u8ba1\n  <\/p>\n<p>\n   \u67e5\u770b\u6b66\u5668\uff1a \u901a\u8fc7F\u6309\u952e\u5b9e\u73b0\u6b66\u5668\u67e5\u770b;\n  <\/p>\n<p>\n   \u6b66\u5668\u4e3a\u5f13\u5f29\u65f6\uff1a\n  <\/p>\n<p>\n   \u84c4\u529b\uff1a\u957f\u6309\u9f20\u6807\u5de6\u952e\u5b8c\u6210\u84c4\u529b\uff1b\n  <\/p>\n<p>\n   \u53d1\u5c04\uff1a\u9f20\u6807\u53f3\u952e\uff1b\n  <\/p>\n<p>\n   \u7784\u51c6\uff1a\u952e\u76d8E\uff1b\n  <\/p>\n<h2 id=\"%E4%BA%8C%E3%80%81%E5%85%B7%E4%BD%93%E5%AE%9E%E7%8E%B0\">\n   \u4e8c\u3001\u5177\u4f53\u5b9e\u73b0<br \/>\n  <\/h2>\n<h3 id=\"1%E3%80%81%E5%9C%B0%E5%9B%BE%E8%AE%BE%E8%AE%A1\">\n   1\u3001\u5730\u56fe\u8bbe\u8ba1<br \/>\n  <\/h3>\n<p>\n   \u4f7f\u7528unity\u4e2d\u7684\u8d44\u6e90\u5546\u5e97\u4e0b\u8f7dLow-Poly Simple Nature Pack\u8d44\u6e90\uff0c\u5e76\u6839\u636e\u81ea\u5df1\u7684\u559c\u597d\u5bf9\u573a\u666f\u4e2d\u7684\u6811\u6728\u5ca9\u77f3\u8fdb\u884c\u8c03\u6574\u3002\u540c\u65f6\u5c06\u6574\u4e2a\u73af\u5883\u8d44\u6e90\u653e\u5728GroundLayer\u5c42\uff08\u53ef\u4ee5\u968f\u673a\u81ea\u5df1\u5b9a\u4e49\uff09\u65b9\u4fbf\u540e\u7eed\u7684\u5730\u9762\u68c0\u6d4b\u3002\n  <\/p>\n<\/p>\n<h3 id=\"2%E3%80%81%E7%8E%A9%E5%AE%B6%E8%A7%92%E8%89%B2%E8%AE%BE%E8%AE%A1\">\n   2\u3001\u73a9\u5bb6\u89d2\u8272\u8bbe\u8ba1<br \/>\n  <\/h3>\n<h4 id=\"a%E3%80%81%E8%B5%84%E6%BA%90%E5%AF%BC%E5%85%A5\">\n   a\u3001\u8d44\u6e90\u5bfc\u5165<br \/>\n  <\/h4>\n<p style=\"text-align:center;\">\n   \u5728Unity\u8d44\u6e90\u5546\u5e97\u4e2d\u627e\u5230\u76f8\u5e94\u7684\u67aa\u68b0\u548c\u52a8\u753b\u8d44\u6e90\u3002\n  <\/p>\n<h4 id=\"b%E3%80%81%E7%8E%A9%E5%AE%B6%E7%A7%BB%E5%8A%A8%E5%92%8C%E8%A7%86%E8%A7%92%E8%AE%BE%E8%AE%A1\">\n   b\u3001\u73a9\u5bb6\u79fb\u52a8\u548c\u89c6\u89d2\u8bbe\u8ba1<br \/>\n  <\/h4>\n<p>\n   \u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u80f6\u56ca\u4f53\uff08Player)\u4f5c\u4e3a\u73a9\u5bb6\u8f7d\u4f53\u5e76\u5c06\u67aa\u68b0\u9884\u5236\u4f53\u6dfb\u52a0\u5230\u8be5\u80f6\u56ca\u4f53\u4e0a\u5e76\u8c03\u6574\u597d\u4f4d\u7f6e\u3002\u4e3a\u73a9\u5bb6\u6dfb\u52a0\u4e00\u4e2a\u6444\u50cf\u673a\uff08camare)\u547d\u540d\u4e3aView\u63a7\u5236\u73a9\u5bb6\u7684\u89c6\u91ce\u53d8\u6362\uff0c\u5728\u73a9\u5bb6\u89d2\u8272\u7684\u5e95\u90e8\u653e\u7f6e\u4e00\u4e2a\u7a7a\u7269\u4f53\uff08groundCheck)\u7528\u6765\u4f5c\u4e3a\u73a9\u5bb6\u548c\u5730\u9762\u7684\u63a5\u89e6\u70b9\u68c0\u6d4b\u3002\u4e3a\u73a9\u5bb6\u6dfb\u52a0Character Controller\uff08\u89d2\u8272\u63a7\u5236\u5668\uff09\u7ec4\u4ef6\u3002\n  <\/p>\n<h5 id=\"%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A01%EF%BC%89%E3%80%81%E8%A7%86%E9%87%8E%E6%8E%A7%E5%88%B6\">\n   1\uff09\u3001\u89c6\u91ce\u63a7\u5236<br \/>\n  <\/h5>\n<p>\n   \u4f7f\u7528ViewController\u811a\u672c\u63a7\u5236\u73a9\u5bb6\u7684\u89c6\u91ce\uff1a\u901a\u8fc7\u5f53\u524d\u9f20\u6807\u7684\u6c34\u5e73\u548c\u5782\u76f4\u65b9\u5411\u7684\u8f93\u5165\u91cf\u6765\u63a7\u5236\u89c6\u91ce\u7684\u5de6\u53f3\u4e0a\u4e0b\u79fb\u52a8\uff0c\u901a\u8fc7\u73a9\u5bb6\u672c\u8eab\u7684\u65cb\u8f6c\u53d8\u5316\u6765\u63a7\u5236\u89c6\u91ce\u7684\u65cb\u8f6c\u53d8\u5316\u3002\u6211\u4eec\u9700\u8981\u73a9\u5bb6\u5bf9\u8c61\u3001\u9f20\u6807\u7684x\u8f74\u65b9\u5411\u7684\u503c\u3001y\u8f74\u65b9\u5411\u7684\u503c\uff0c\u901a\u8fc7Clamp\u51fd\u6570\u7528\u6765\u9650\u5236\u89c6\u91ce\u7684\u6c34\u5e73\u65b9\u5411\u4e0a\u7684\u6700\u5927\u6700\u5c0f\u79fb\u52a8\u89d2\u5ea6\u3002\u6838\u5fc3\u4ee3\u7801\u5b9e\u73b0\u5982\u4e0b\uff1a\n  <\/p>\n<pre><code class=\"language-cs\">    private void Update(){\n        \/\/\u901a\u8fc7\u83b7\u53d6\u9f20\u6807\u7684\u5750\u6807\u6765\u5b9e\u73b0\u89c6\u89d2\u7684\u79fb\u52a8\n        mouseX = Input.GetAxis(\"Mouse X\") * mouseSensitivity*Time.deltaTime;\n        mouseY = Input.GetAxis(\"Mouse Y\") * mouseSensitivity*Time.deltaTime;\n        xRotation -= mouseY;\n        xRotation  = Mathf.Clamp(xRotation,-70f,70f);\n        \/\/\u901a\u8fc7\u63a7\u5236plyar\u7684\u4f4d\u7f6e\u6765\u5b9e\u73b0\u89c6\u89d2\u7684\u79fb\u52a8\n        player.Rotate(Vector3.up*mouseX);\n        \/\/\u5b9e\u73b0\u76f8\u673a\u7684\u65cb\u8f6c\n        transform.localRotation = Quaternion.Euler(xRotation, 0, 0);\n    }<\/code><\/pre>\n<h5 id=\"%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A02%EF%BC%89%E3%80%81%E8%A7%92%E8%89%B2%E7%A7%BB%E5%8A%A8\">\n   2\uff09\u3001\u89d2\u8272\u79fb\u52a8<br \/>\n  <\/h5>\n<p>\n   \u901a\u8fc7\u83b7\u53d6\u952e\u76d8\u7684\u6c34\u5e73\u548c\u5782\u76f4\u65b9\u5411\u7684\u8f93\u5165\u6765\u63a7\u5236\u89d2\u8272\u7684\u79fb\u52a8\u3002\u5728\u89d2\u8272\u7684\u79fb\u52a8\u8fc7\u7a0b\u4e2d\u6211\u4eec\u9700\u8981\u4e09\u4e2a\u5e03\u5c14\u53d8\u91cf\u6765\u63a7\u5236\u89d2\u8272\u7684\u79fb\u52a8\u901f\u5ea6\u6765\u533a\u5206\u89d2\u8272\u7684\u884c\u8d70\u3001\u5954\u8dd1\u548c\u8df3\u8dc3\u00a0\u3002\u5728\u89d2\u8272\u79fb\u52a8\u8fc7\u7a0b\u4e2d\u6211\u4eec\u8fd8\u9700\u8981\u5bf9\u89d2\u8272\u8fdb\u884c\u5730\u9762\u68c0\u6d4b\uff0c\u7528\u6765\u5224\u65ad\u89d2\u8272\u5f53\u524d\u662f\u5426\u5728\u5730\u9762\u4e0a\u00a0\u3002\u5730\u9762\u68c0\u6d4b\u7684\u539f\u7406\u5c31\u662f\u5229\u7528\u7269\u7406\u5c04\u7ebf\uff0c\u4ece\u5f53\u524d\u7684\u5730\u9762\u68c0\u67e5\u70b9\u7684\u4f4d\u7f6e\u5411\u4e0b\u5782\u76f4\u53d1\u51fa\u4e00\u6761\u7269\u7406\u5c04\u7ebf\uff0c\u68c0\u6d4b\u8303\u56f4\u4e3a0.1\uff0c\u68c0\u67e5\u7684\u56fe\u5c42\u4e3agroundLayer\u3002\u540c\u65f6\u4e3a\u89d2\u8272\u6dfb\u52a0Audio Source\u7ec4\u4ef6\u901a\u8fc7\u83b7\u53d6Audio Clip\u8d44\u6e90\u6765\u64ad\u653e\u76f8\u5e94\u7684\u79fb\u52a8\u97f3\u6548\u3002\n  <\/p>\n<pre><code class=\"language-cs\">    public void CheckGround(){\n        isGrounded = Physics.CheckSphere(groundCheck.position, 0.1f, groundLayer);\n        if(isGrounded &amp;&amp; velocity.y &lt;= 0){\n            velocity.y = -2f;\n        }\n    }<\/code><\/pre>\n<p>\n   \u89d2\u8272\u8df3\u8dc3\u901a\u8fc7\u5224\u65ad\u952e\u76d8\u7684\u7a7a\u683c\u662f\u5426\u6709\u8f93\u5165\uff0c\u5e76\u7ed9\u73a9\u5bb6\u4f5c\u7528\u4e00\u4e2a\u5411\u4e0a\u7684\u529b\u5b9e\u73b0\u73a9\u5bb6\u7684\u8df3\u8dc3\uff0c\u5728\u5730\u9762\u68c0\u6d4b\u7684\u51fd\u6570\u4e2d\u5b9e\u73b0\u73a9\u5bb6\u7684\u4e0b\u843d\u5b9e\u73b0\u5b8c\u6574\u7684\u8df3\u8d8a\u8fc7\u7a0b\u3002\n  <\/p>\n<pre><code class=\"language-cs\">    public void Jump(){\n        \/\/\u83b7\u53d6\u6309\u952e\u7684\u503c\n        isjump = Input.GetButtonDown(jumpInputName);\n        if(isjump &amp;&amp; isGrounded ){\n            velocity.y = Mathf.Sqrt(jumpForce* -2f * gravity);\n        }\n    }<\/code><\/pre>\n<p>\n   \u5177\u4f53\u7684\u73a9\u5bb6\u5176\u4ed6\u76f8\u5173\u8bbe\u7f6e\u53ef\u4ee5\u901a\u8fc7\u67e5\u770b\u9879\u76ee\u7684movecontroller\u811a\u672c\u5b9e\u73b0\u3002\n  <\/p>\n<h4 id=\"%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0c%E3%80%81%E7%8E%A9%E5%AE%B6%E5%B0%84%E5%87%BB%E5%AE%9E%E7%8E%B0\">\n   c\u3001\u73a9\u5bb6\u5c04\u51fb\u5b9e\u73b0<br \/>\n  <\/h4>\n<h5 id=\"%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A01%EF%BC%89%E3%80%81%E5%B0%84%E5%87%BB%E7%9A%84%E5%8A%A8%E7%94%BB%E7%8A%B6%E6%80%81%E6%9C%BA%E8%AE%BE%E7%BD%AE\">\n   1\uff09\u3001\u5c04\u51fb\u7684\u52a8\u753b\u72b6\u6001\u673a\u8bbe\u7f6e<br \/>\n  <\/h5>\n<p>\n   \u521b\u5efa\u4e00\u4e2a\u52a8\u753b\u72b6\u6001\u673a\u6839\u636e\u4e0d\u540c\u7684\u72b6\u6001\u64ad\u653e\u4e0d\u540c\u7684\u52a8\u753b\uff0c\u901a\u8fc7\u63a7\u5236\u8fb9\u7684\u6761\u4ef6\u5b9e\u73b0\u4e0d\u540c\u52a8\u753b\u4e4b\u95f4\u7684\u5207\u6362\u3002\u9996\u5148\u73a9\u5bb6\u8fdb\u5165\u6e38\u620f\u5c31\u4f1a\u9ed8\u8ba4\u6267\u884ctake_out_weapon\u52a8\u753b\uff0c\u8be5\u52a8\u753b\u662f\u73a9\u5bb6\u62ff\u51fa\u6b66\u5668\u7684\u52a8\u753b\uff0c\u968f\u540e\u8fdb\u5165\u7b49\u5f85\u72b6\u6001\uff08Idel)\uff0c\u901a\u8fc7inspect\u3001Run\u3001Walk\u3001Aim\u56db\u4e2a\u5e03\u5c14\u53d8\u91cf\u6765\u63a7\u5236\u6b66\u5668\u68c0\u89c6\u3001\u5954\u8dd1\u3001\u884c\u8d70\u3001\u7784\u51c6\u56db\u4e2a\u72b6\u6001\u52a8\u753b\u7684\u64ad\u653e\u4e0e\u9000\u51fa\u3002\n  <\/p>\n<\/p>\n<h5 id=\"%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A02%EF%BC%89%E3%80%81%E5%B0%84%E5%87%BB%E8%84%9A%E6%9C%AC%E5%AE%9E%E7%8E%B0\">\n   2\uff09\u3001\u5c04\u51fb\u811a\u672c\u5b9e\u73b0<br \/>\n  <\/h5>\n<p>\n   \u5c04\u51fb\u7684\u811a\u672c\u4e3aweaponController\u5176\u4e2d\u7684\u6838\u5fc3\u65b9\u6cd5\u662fGunFire()\u7528\u6765\u5b9e\u73b0\u5c04\u51fb\u3002\u5c04\u51fb\u7684\u672c\u8d28\u4e5f\u662f\u4ece\u5f53\u524d\u7684\u51c6\u5fc3\u7684\u4f4d\u7f6e\u5411\u524d\u6253\u51fa\u4e00\u6761\u5c04\u7ebf\uff0c\u5728\u5c04\u7ebf\u8303\u56f4\u5185\u5982\u679c\u51fb\u4e2d\u7269\u4f53\u5219\u5c06\u96c6\u4e2d\u7684\u4f4d\u7f6e\u5b58\u50a8\u5728hit\u4e2d\u3002\u5728\u5c04\u51fb\u8fc7\u7a0b\u4e2d\u4f1a\u4ea7\u751f\u4e00\u4e9b\u7c92\u5b50\u6548\u679c\u6bd4\u5982\uff1a\u67aa\u53e3\u7684\u5f00\u706b\u7c92\u5b50\u7279\u6548\u3001\u5f39\u58f3\u7684\u629b\u51fa\u7279\u6548\u3001\u5b50\u5f39\u5c04\u51fb\u7684\u706b\u82b1\u7279\u6548\u3001\u5c04\u4e2d\u7269\u4f53\u4ea7\u751f\u7684\u5f39\u5b54\u7c92\u5b50\u7279\u6548\u7b49\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e0b\u56db\u4e2a\u53d8\u91cf\u6765\u83b7\u53d6\u548c\u5b9e\u73b0\u7279\u6548\u7684\u64ad\u653e\u4e0e\u56de\u6536\u3002\n  <\/p>\n<p>\n   \u63a7\u5236\u7279\u6548\u53d8\u91cf\u548c\u5c04\u51fb\u6838\u5fc3\u4ee3\u7801\uff1a\n  <\/p>\n<pre><code class=\"language-cs\">    public ParticleSystem muzzleFlash; \/\/\u67aa\u53e3\u7279\u6548\n    public Light MuzzleLight; \/\/\u67aa\u53e3\u5149\u7167\n\n    public GameObject hitParticle;\/\/\u5b50\u5f39\u5c04\u51fb\u7684\u7c92\u5b50\u6548\u679c\n    public GameObject bullectHole;<\/code><\/pre>\n<pre><code class=\"language-cs\">    public void GunFire(){\n        \/\/\u5982\u679c\u8ba1\u65f6\u5668\u7684\u503c\u5c0f\u4e8e\u5c04\u901f\n        if(fireTimer &lt; fireRate || currentBullets &lt;= 0 || isReload || PM.isRunning){\n            return ;\n        }\n\n        \/\/\u5b9a\u4e49\u5c04\u51fb\u7684\u65b9\u5411\n        Vector3 shootDirection = shooterPoint.forward;\n        RaycastHit hit;\n        \/\/\u4f7f\u7528\u5c04\u7ebf\u68c0\u6d4b  \u4eceshooterPoint\u5c04\u5411\u8303\u56f4\u5185\u7684\u7269\u4f53\u5982\u679c\u51fb\u4e2d\u4e86\u4e00\u4e9b\u7269\u4f53 \u5219\u5c06hit.point\u8d4b\u503c\u7ed9hit.point\n        if(Physics.Raycast(shooterPoint.position,shootDirection,out hit,range)){\n            Debug.Log(hit.collider.transform.name+\"\u88ab\u51fb\u4e2d\u4e86\");\n            \/\/\u521b\u5efa\u5b50\u5f39\u51fb\u4e2d\u7269\u4f53\u7684\u706b\u82b1\u7279\u6548\n            GameObject hitParticleEffect = Instantiate(hitParticle,hit.point,Quaternion.FromToRotation(Vector3.up,hit.normal));\n            \/\/\u5b9e\u4f8b\u5316\u5f39\u5b54\u7279\u6548\n            GameObject bullectHoleEffect = Instantiate(bullectHole,hit.point,Quaternion.FromToRotation(Vector3.up,hit.normal));\n            GameObject hittedObject = hit.collider.gameObject;\n            bullectHoleEffect.transform.SetParent(hittedObject.transform);\n            \n            if(hittedObject.CompareTag(\"Animal\")){\n                hittedObject.GetComponents&lt;IDamageable&gt;()[0].TakeDamage(1); \/\/\u8c03\u7528\u88ab\u51fb\u4e2d\u7269\u4f53\u7684TakeDamage\u65b9\u6cd5\n                Debug.Log(hittedObject.name+\"Animal\u88ab\u51fb\u4e2d\u4e86\");\n                \n            }\n            if(hittedObject.CompareTag(\"Target\")){\n                string message = \"target is hitted!score+1\";\n                hitUI.ShowHitMessage(message);\n                scoreController.AddScore(1); \/\/\u8c03\u7528\u88ab\u51fb\u4e2d\u7269\u4f53\u7684TakeDamage\u65b9\u6cd5\n            }\n            \/\/\u7279\u6548\u7684\u56de\u6536\n            Destroy(hitParticleEffect,1f);\n            Destroy(bullectHoleEffect,3f);\n        }\n        \/\/\u662f\u5426\u7784\u51c6\u72b6\u6001\n        if(!isAiming){\n            \/\/\u5bf9\u52a8\u753b\u72b6\u6001\u8fdb\u884c\u6de1\u5165\u6de1\u51fa\u7684\u52a8\u753b\n            animator.CrossFadeInFixedTime(\"fire\",0.1f); \n        }else{\n            \/\/\u7784\u51c6\u72b6\u6001\u4e0b\u7684\u5f00\u706b\u52a8\u753b\n            animator.CrossFadeInFixedTime(\"aim_fire\",0.1f); \n\n\n        }\n        PlayerShootSound(); \/\/\u64ad\u653e\u5c04\u51fb\u97f3\u6548\n        MuzzleLight.enabled = true; \/\/\u64ad\u653e\u67aa\u53e3\u5149\u7167\n        muzzleFlash.Play(); \/\/\u64ad\u653e\u67aa\u53e3\u7279\u6548\n        \/\/\u629b\u51fa\u5f39\u58f3\u52a8\u753b\n        Instantiate(casingPrefab,casingSpawnPoint.transform.position,casingSpawnPoint.transform.rotation);\n        \/\/\u6263\u9664\u4e00\u4e2a\u5f39\u836f\n        currentBullets --; \/\/\u6263\u9664\u4e00\u4e2a\u5f39\u836f\n        UpdateAmmoUI();\n        \/\/\u5c04\u51fb\u5b8c\u6210\u7684\u65f6\u5019\u91cd\u7f6e\u8ba1\u65f6\u5668\n        fireTimer = 0f;\n    }<\/code><\/pre>\n<\/p>\n<p style=\"text-align:center;\">\n   \u5c04\u51fb\u6548\u679c\u5c55\u793a\n  <\/p>\n<p>\n   \u7784\u51c6\u672c\u8d28\u4e0a\u5c31\u662f\u6444\u50cf\u673a\u7684\u4f4d\u7f6e\u7684\u53d8\u6362\uff0c\u5c06\u6444\u50cf\u673a\u7684\u4f4d\u7f6e\u76f8\u5bf9\u4e8e\u89d2\u8272\u4f4d\u7f6e\u5f80\u524d\u79fb\u52a8\u5373\u53ef\u5c06\u89c6\u91ce\u62c9\u8fd1\u5b9e\u73b0\u7784\u51c6\uff0c\u5728\u8fdb\u5165\u7784\u51c6\u72b6\u6001\u65f6\u6211\u4eec\u9700\u8981\u9690\u85cf\u51c6\u5fc3\u3002\u5177\u4f53\u4ee3\u7801\u5b9e\u73b0\u5982\u4e0b\uff1a\n  <\/p>\n<pre><code class=\"language-cs\">    public void DoingAim(){\n        \/\/\u7784\u51c6\u5224\u65ad\n        if(Input.GetMouseButton(1) &amp;&amp; !isReload &amp;&amp; !PM.isRunning){\n            isAiming = true;\n            animator.SetBool(\"Aim\",true);\n            \/\/\u51c6\u5fc3\u6d88\u5931\n            CrossHairUI.gameObject.SetActive(false);\n\n            \/\/\u89c6\u91ce\u524d\u79fb\n            mainCamera.fieldOfView = 25;\/\/\u7784\u51c6\u7684\u89c6\u91ce\n        }else{\n            isAiming = false;\n            animator.SetBool(\"Aim\",false);\n            \/\/\u51c6\u5fc3\u51fa\u73b0\n            CrossHairUI.gameObject.SetActive(true);\n            mainCamera.fieldOfView = 60;\/\/\u7784\u51c6\u7684\u89c6\u91ce\n        }\n\n    }<\/code><\/pre>\n<h3>\n  <\/h3>\n<\/p>\n<p style=\"text-align:center;\">\n   \u975e\u7784\u51c6\u72b6\u6001\u6548\u679c\u5c55\u793a\n  <\/p>\n<p style=\"text-align:center;\">\n   \u7784\u51c6\u72b6\u6001\u6548\u679c\u5c55\u793a\n  <\/p>\n<p>\n   5\uff09\u3001\u5f13\u5f29\u5c04\u51fb\u5b9e\u73b0\n  <\/p>\n<p>\n   a\u3001\u52a8\u753b\u72b6\u6001\u673a\u2014\u2014\u91c7\u7528\u6df7\u5408\u6811\u5b9e\u73b0\u534a\u84c4\u529b\u548c\u84c4\u529b\n  <\/p>\n<\/p>\n<p style=\"text-align:center;\">\n   \u52a8\u753b\u72b6\u6001\u673a\n  <\/p>\n<p>\n   b\u3001\u811a\u672c\u63a7\u5236\u6838\u5fc3\u4ee3\u7801\n  <\/p>\n<p>\n   \u91c7\u7528\u57fa\u4e8e\u52a8\u4f5c\u5206\u79bb\u7248\u7684\u5b9e\u73b0\uff0c\u901a\u8fc7\u7bad\u77e2\u7684\u98de\u884c\u52a8\u4f5c\u7ba1\u7406\u57fa\u7c7b\u5b9e\u73b0\u53d1\u5c04\u7684\u7bad\u77e2\u7684\u98de\u884c\u63a7\u5236\uff0c\u5728ArrowController\u811a\u672c\u4e2d\u63a7\u5236\u5f13\u5f29\u53d1\u5c04\u5f13\u7bad\u3002\u7bad\u77e2\u91c7\u7528\u5bf9\u8c61\u6c60\u6280\u672f\u8fdb\u884c\u7ba1\u7406\u548c\u56de\u6536\u3002\n  <\/p>\n<pre><code class=\"language-cs\">public class ArrowFactory : MonoBehaviour\n{\n    public ArrowController arrowCtrl;\n    public GameObject arrow;\n    void Start()\n    {\n        arrowCtrl = FindObjectOfType&lt;ArrowController&gt;();\n    }\n\n    void Update(){\n    }\n\n    public GameObject GetArrow(){    \/\/ \u83b7\u53d6\u7a7a\u95f2\u7684\u7bad\n        arrow = GameObject.Instantiate(Resources.Load(\"Prefab\/Arrow\", typeof(GameObject))) as GameObject;\n        if(arrow == null){\n            Debug.Log(\"\u7bad\u9884\u5236\u4f53\u4e3a\u7a7a\");\n        }\n        \/\/\u5f97\u5230\u5f13\u7bad\u4e0a\u642d\u7bad\u7684\u4f4d\u7f6e                       \n        Transform bow_mid = arrowCtrl.bow.transform.GetChild(4);   \/\/ \u83b7\u5f97\u7bad\u5e94\u8be5\u653e\u7f6e\u7684\u4f4d\u7f6e\n\n        arrow.transform.position = bow_mid.transform.position;               \/\/\u5c06\u7bad\u7684\u4f4d\u7f6e\u8bbe\u7f6e\u4e3a\u5f13\u4e2d\u95f4\u7684\u4f4d\u7f6e\n        arrow.transform.rotation = arrowCtrl.bow.transform.rotation;    \/\/ \u5c06\u7bad\u7684\u65cb\u8f6c\u89d2\u5ea6\u8bbe\u7f6e\u4e3a\u5f13\u7684\u65cb\u8f6c\u89d2\u5ea6\n\n        arrow.transform.parent = arrowCtrl.bow.transform;        \/\/\u7bad\u968f\u5f13\u7684\u4f4d\u7f6e\u53d8\u5316\n        arrow.gameObject.SetActive(false);\n\n        return arrow;\n    }\n\n    public void RecycleArrow(GameObject arrow)        \/\/ \u56de\u6536\u7bad\n    {\n        arrow.SetActive(false);\n        DestroyImmediate(arrow);\n    }\n}\n<\/code><\/pre>\n<\/p>\n<p>\n   ArrowController\u811a\u672c\u4e2d\u5b9e\u73b0\u5c04\u51fb\u7684\u6838\u5fc3\u4ee3\u7801\uff1a\n  <\/p>\n<pre><code class=\"language-cs\">\/\/ArrowCOntroller\u6838\u5fc3\u4ee3\u7801\u5b9e\u73b0    \nvoid aniShoot(){\n        if(Input.GetMouseButtonDown(0) &amp;&amp; state == 0){\n            transform.GetChild(4).gameObject.SetActive(true);\/\/\u663e\u793a\u62c9\u5f13\u52a8\u753b\n            isLongPressing = true;\n            animator.SetTrigger(\"pull\");\n            pressTime = Time.time;\n            state = 1;\n            PlayeSound(1);\n        }\n        \/\/\u9f20\u6807\u5de6\u952e\u62ac\u8d77\n        if(Input.GetMouseButtonUp(0) &amp;&amp; state == 1){\n\n            isLongPressing = false;\n            float duration = Time.time - pressTime;\n            \/\/\u672a\u84c4\u6ee1\u529b\u5ea6\n            if(duration &lt; longPressDuration){\n                power = duration\/2;\n            }else{\n                power = 1.0f;\n            }\n            animator.SetFloat(\"power\", power);\n            animator.SetTrigger(\"hold\");\n            state = 2;\n        }\n        if(isLongPressing &amp;&amp; Time.time - pressTime &gt; longPressDuration)\n        {\n            isLongPressing = false;\n            power = 1.0f;\n            animator.SetFloat(\"power\", power);\n            animator.SetTrigger(\"hold\");\n\n        }\n        if(Input.GetMouseButtonDown(1) &amp;&amp; state == 2)\n        {\n            transform.GetChild(4).gameObject.SetActive(false);\/\/\u9690\u85cf\u62c9\u5f13\u52a8\u753b\n            animator.SetTrigger(\"shoot\");\n            arrow = arrows[0];\n            arrow.SetActive(true);\n            flyed.Add(arrow);\n            arrows.RemoveAt(0);\n            if(arrow==null)\n            {\n                message = \"no arrow!\";\n                \/\/ hitUI.ShowHitMessage(message);\n                Debug.Log(message);\n            }\n            shootManager.ArrowShoot(arrow,mainCamera.transform.forward,power);\n            Debug.Log(mainCamera.transform.forward);\n            animator.SetFloat(\"power\", 1.0f);\/\/\u6062\u590d\u529b\u5ea6\n            arrowNum-=1;\n            state = 0;\n            isAming = false;\n            PlayeSound(2);  \n        }\n    }<\/code><\/pre>\n<h3 id=\"%C2%A0%20%C2%A03%E3%80%81%E7%A7%BB%E5%8A%A8%E9%9D%B6%E5%92%8C%E5%9B%BA%E5%AE%9A%E9%9D%B6%E8%AE%BE%E8%AE%A1%C2%A0%20%C2%A0\">\n   3\u3001\u79fb\u52a8\u9776\u548c\u56fa\u5b9a\u9776\u8bbe\u8ba1<br \/>\n  <\/h3>\n<h4 id=\"%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%201%E3%80%81%E5%9B%BA%E5%AE%9A%E9%9D%B6%20%C2%A0%20%C2%A0\">\n   1\u3001\u56fa\u5b9a\u9776<br \/>\n  <\/h4>\n<p>\n   \u56fa\u5b9a\u9776\u91c7\u7528\u4e00\u4e2a\u5706\u67f1\u4f53\u5b9e\u73b0\uff0c\u901a\u8fc7\u63a7\u5236\u5706\u67f1\u4f53\u7684\u9ad8\u548c\u65cb\u8f6c\u5c06\u5176\u5236\u4f5c\u6210\u9776\u5b50\uff0c\u5e76\u4f7f\u7528\u8d34\u56fe\u4e3a\u5176\u6dfb\u52a0\u5916\u89c2\u3002\u4e3a\u56fa\u5b9a\u9776\u6dfb\u52a0\u4e00\u4e2a\u78b0\u649e\u5668\uff0c\u65b9\u4fbf\u540e\u7eed\u7684\u5c04\u7ebf\u68c0\u6d4b\u3002\n  <\/p>\n<\/p>\n<h4 id=\"%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%202%E3%80%81%E7%A7%BB%E5%8A%A8%E9%9D%B6%EF%BC%88Sheep%EF%BC%89%C2%A0%20%C2%A0%20%C2%A0\">\n   2\u3001\u79fb\u52a8\u9776\uff08Sheep\uff09<br \/>\n  <\/h4>\n<h5>\n   a\u3001\u8d44\u6e90\u5bfc\u5165<br \/>\n  <\/h5>\n<p>\n   \u901a\u8fc7unity\u8d44\u6e90\u5546\u5e97\u5bfc\u5165Sheep\u7684\u9884\u5236\u8d44\u6e90\uff08\u53ef\u4ee5\u81ea\u884c\u4e0b\u8f7d\u9009\u62e9\u5176\u4ed6\u8d44\u6e90\uff09\u5c06\u9884\u5236\u4f53\u653e\u5165\u5230\u573a\u666f\u4e2d\u5e76\u63a7\u5236\u597d\u4f4d\u7f6e\u3002\u4e3a\u6bcf\u4e00\u4e2a\u9884\u5236\u4f53\u6dfb\u52a0\u4e00\u4e2a\u78b0\u649e\u5668\u5e76\u8c03\u6574\u78b0\u649e\u5668\u7684\u5927\u5c0f\u4fdd\u8bc1\u80fd\u591f\u8986\u76d6\u6574\u4e2a\u9884\u5236\u4f53\u3002\n  <\/p>\n<h5>\n  <\/h5>\n<h5>\n   b\u3001\u79fb\u52a8\u9776\u7684\u81ea\u52a8\u5bfb\u8def\u8bbe\u7f6e<br \/>\n  <\/h5>\n<p>\n   \u5bf9\u4e8eSheep\u6211\u4eec\u91c7\u7528Unity\u4e2d\u7684AI\u4e2d\u7684NavMesh Agent\u667a\u80fd\u4f53\u5b9e\u73b0\u6bcf\u4e00\u4e2aSheep\u5bf9\u8c61\u7684\u81ea\u52a8\u5bfb\u8def\u5b9e\u73b0Sheep\u7684\u968f\u673a\u79fb\u52a8\u00a0\u3002\u9996\u5148\u6211\u4eec\u9700\u8981\u4e3a\u6211\u4eec\u7684\u73af\u5883\u8d44\u6e90\u6dfb\u52a0\u4e00\u4e2aNavMeshSurface\u7ec4\u4ef6\u7528\u6765\u8ba1\u7b97\u5730\u56fe\u4e2d\u53ef\u4ee5\u79fb\u52a8\u7684\u7f51\u683c\uff0c\u901a\u8fc7\u4e3a\u73af\u5883\u4e2d\u7684\u5176\u4ed6\u8d44\u6e90\u6bd4\u5982\uff1a\u6811\u3001\u5ca9\u77f3\u7b49\u6dfb\u52a0NavMeshObstacle\u7ec4\u4ef6\u6765\u963b\u6b62Sheep\u5bf9\u8c61\u5c06\u4ed6\u4eec\u7684\u4f4d\u7f6e\u4f5c\u4e3a\u79fb\u52a8\u7684\u76ee\u6807\u3002\u540c\u65f6\u6211\u4eec\u8fd8\u5fc5\u987b\u4e3a\u6211\u4eec\u7684\u79fb\u52a8\u76ee\u6807Sheep\u6dfb\u52a0\u4e00\u4e2aNavMeshAgent\u7ec4\u4ef6\u5b9e\u73b0\u81ea\u52a8\u5bfb\u8def\u529f\u80fd\u3002\n  <\/p>\n<\/p>\n<p>\n   \u6211\u4eec\u901a\u8fc7\u968f\u673a\u7684\u4e3a\u6bcf\u4e00\u4e2aSheep\u5bf9\u8c61\u968f\u673a\u7684\u751f\u6210\u4e00\u4e2a\u76ee\u6807\u5730\u70b9\uff0c\u5e76\u8ba9Sheep\u5bf9\u8c61\u79fb\u52a8\u5230\u8be5\u5730\u70b9\uff0c\u5e76\u968f\u673a\u8bbe\u7f6e\u4e00\u5b9a\u7684\u7a7a\u95f2\u65f6\u95f4\u3002\u5bf9\u4e8e\u7a7a\u95f2\u7b49\u5f85\u548c\u79fb\u52a8\u5230 \u76ee\u6807\u5730\u70b9\u6211\u91c7\u53d6\u534f\u7a0b\u5904\u7406\u7684\u65b9\u5f0f\uff0c\u5177\u4f53\u6765\u8bf4\uff0c\u8fd9\u6bb5\u4ee3\u7801\u901a\u8fc7<br \/>\n   <code><br \/>\n    StartCoroutine<br \/>\n   <\/code><br \/>\n   \u542f\u52a8\u534f\u7a0b\uff0c\u5e76\u5728<br \/>\n   <code><br \/>\n    moveToDestination<br \/>\n   <\/code><br \/>\n   \u65b9\u6cd5\u4e2d\u901a\u8fc7<br \/>\n   <code><br \/>\n    yield return null<br \/>\n   <\/code><br \/>\n   \u6bcf\u5e27\u6682\u505c\uff0c\u76f4\u81f3\u8fbe\u5230\u76ee\u7684\u5730\u6216\u8d85\u65f6\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5728\u4e3b\u7ebf\u7a0b\u4e2d\u8fdb\u884c\u8017\u65f6\u7684\u8ba1\u7b97\uff0c\u4ece\u800c\u4fdd\u6301\u6e38\u620f\u7684\u6d41\u7545\u6027\u00a0\u3002\u5bf9\u4e8e\u7a7a\u95f2\u7b49\u5f85\u72b6\u6001\u4e5f\u662f\u91c7\u7528\u76f8\u540c\u7684\u6280\u672f\u968f\u673a\u751f\u6210\u4e00\u5b9a\u7684\u7a7a\u95f2\u7b49\u5f85\u65f6\u95f4\u3002\n  <\/p>\n<pre><code class=\"language-cs\">    private void HandleIdle(){\n        StartCoroutine(waitToMove());\n    }\n\n    private IEnumerator waitToMove(){\n        float waitTime = UnityEngine.Random.Range(IdleTime\/2,IdleTime*2);\n        yield return new WaitForSeconds(waitTime);\n\n        Vector3 randomDestination = GetRandomDestination(transform.position, HanderDistance);\n        agent.SetDestination(randomDestination);\n        SetState(AnimalState.Move);\n    }<\/code><\/pre>\n<pre><code class=\"language-cs\">    private Vector3 GetRandomDestination(Vector3 origin,float distance){\n            for(int i=0;i&lt;5;i++){\n                Vector3 RandomDirection =UnityEngine.Random.insideUnitSphere * distance;\n                RandomDirection += origin;\n                UnityEngine.AI.NavMeshHit hit;\n                if(UnityEngine.AI.NavMesh.SamplePosition(RandomDirection,out hit,distance,UnityEngine.AI.NavMesh.AllAreas)){\n                    return hit.position;\n                }               \n            }\n            return origin;\n    }<\/code><\/pre>\n<pre><code class=\"language-cs\">    private void HandleMove(){\n        StartCoroutine(moveToDestination());\n    }\n\n    private IEnumerator moveToDestination(){\n        float startTime = Time.time;\n        \/\/\u5982\u679c\u5728\u6b65\u884c\u6700\u5927\u65f6\u95f4\u5185\u6ca1\u6709\u5230\u8fbe\u76ee\u7684\u5730\u5c31\u4f1a\u91cd\u65b0\u89c4\u5212\u8def\u7ebf\n        while(agent.remainingDistance &gt; agent.stoppingDistance ){\n\n            if(Time.time - startTime &gt; maxMoveTime){\n                agent.ResetPath();\n                SetState(AnimalState.Idle);\n                yield break;\n            }\n            yield return null;\n        }\n        \/\/\u5230\u8fbe\u76ee\u7684\u5730\u540e\u505c\u6b62\u79fb\u52a8\n        SetState(AnimalState.Idle);\n    }<\/code><\/pre>\n<h5>\n   c\u3001\u5bf9\u8c61\u7684\u9500\u6bc1<br \/>\n  <\/h5>\n<p>\n   \u5bf9\u4e8e\u8840\u91cf\u4f4e\u4e8e0\u7684Sheep\u5bf9\u8c61\u91c7\u7528\u4e8b\u4ef6\u76d1\u542c\u673a\u5236\uff0c\u6ce8\u518c\u9500\u6bc1\u884c\u4e3a\u7684\u89e6\u53d1\u5668\u3002\u5176\u4e2d<br \/>\n   <code><br \/>\n    OnDestroy<br \/>\n   <\/code><br \/>\n   \u5728\u5bf9\u8c61\u88ab\u9500\u6bc1\u65f6\u81ea\u52a8\u8c03\u7528\u3002\u5728\u6b64\u65b9\u6cd5\u4e2d\uff0c\u8fc7<br \/>\n   <code><br \/>\n    OnSheepDestroy?.Invoke(gameObject);<br \/>\n   <\/code><br \/>\n   \u89e6\u53d1<br \/>\n   <code><br \/>\n    OnSheepDestroy<br \/>\n   <\/code><br \/>\n   \u4e8b\u4ef6\uff0c\u5e76\u5c06\u5f53\u524d\u7684<br \/>\n   <code><br \/>\n    gameObject<br \/>\n   <\/code><br \/>\n   \uff08\u5373\u88ab\u9500\u6bc1\u7684\u7f8a\u5bf9\u8c61\uff09\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9\u6240\u6709\u8ba2\u9605\u4e86\u8fd9\u4e2a\u4e8b\u4ef6\u7684\u5904\u7406\u7a0b\u5e8f\u3002<br \/>\n   <code><br \/>\n    ?.<br \/>\n   <\/code><br \/>\n   \u662f null \u6761\u4ef6\u8fd0\u7b97\u7b26\uff0c\u786e\u4fdd\u53ea\u6709\u5728\u6709\u8ba2\u9605\u8005\u7684\u60c5\u51b5\u4e0b\u624d\u8c03\u7528\u8be5\u4e8b\u4ef6\u3002\u540c\u65f6\u5b9e\u73b0\u8be5\u4e8b\u4ef6\u7684\u76d1\u542c\u5668\u5bf9Sheep\u5bf9\u8c61\u88ab\u9500\u6bc1\u65f6\u7684\u4e8b\u4ef6\u8fdb\u884c\u76d1\u542c\uff0c\u5e76\u6267\u884c\u5bf9\u5e94\u7684\u9500\u6bc1\u64cd\u4f5c\u548c\u5206\u6570\u66f4i\u6027\u80fd\u64cd\u4f5c\u3002\n  <\/p>\n<pre><code class=\"language-cs\">    public static event Action&lt;GameObject&gt; OnSheepDestroy;\n    private void OnDestroy(){\n        OnSheepDestroy?.Invoke(gameObject);\n    }\n<\/code><\/pre>\n<pre><code class=\"language-cs\">public class DistoryListener : MonoBehaviour\n{\n    public ScoreController scoreController;\n    private void OnEnable(){\n        SheepController.OnSheepDestroy += HandleSheepDestroy;\n        scoreController = FindObjectOfType&lt;ScoreController&gt;();\n    }\n\n    private void OnDisable(){\n        SheepController.OnSheepDestroy -= HandleSheepDestroy;\n    }\n\n    private void HandleSheepDestroy(GameObject sheep){\n        Destroy(sheep);\n        scoreController.AddScore(5);\n    }\n\n}<\/code><\/pre>\n<h5>\n   d\u3001\u52a8\u753b\u72b6\u6001\u673a\u8bbe\u7f6e<br \/>\n  <\/h5>\n<p>\n   \u5229\u7528\u8d44\u6e90\u91cc\u7684\u52a8\u753b\u8bbe\u7f6e\u76f8\u5e94\u7684\u52a8\u753b\u72b6\u6001\u673a\u63a7\u5236Sheep\u5bf9\u8c61\u7684\u79fb\u52a8\u548c\u7b49\u5f85\u3001\u6b7b\u4ea1\u7b49\u72b6\u6001\u3002\n  <\/p>\n<h3>\n   4\u3001\u5c0f\u5730\u56fe\u8bbe\u8ba1<br \/>\n  <\/h3>\n<p>\n   \u91c7\u7528\u63a9\u819c\u548c\u591a\u6444\u50cf\u673a\u7ed3\u5408\u7684\u65b9\u5f0f\u5728UI\u754c\u9762\u8bbe\u8ba1RawImag\u6765\u5b9e\u73b0\u3002\n  <\/p>\n<h3>\n   5\u3001\u5206\u6570\u8ba1\u7b97<br \/>\n  <\/h3>\n<p>\n   \u8bbe\u8ba1ScoreController\u7c7b\u6765\u5b9e\u73b0\u5168\u5c40\u7684\u5206\u6570\u63a7\u5236\u3002\u5728\u4f7f\u7528\u5f13\u5f29\u8fdb\u884c\u8bbe\u8ba1\u65f6\u7684\u8ba1\u5206\u7531\u4e8e\u5f13\u7bad\u91c7\u7528\u4e86\u521a\u4f53\u7ec4\u4ef6\u56e0\u6b64\u6211\u4eec\u91c7\u7528\u78b0\u649e\u68c0\u6d4b\u673a\u5236\u6765\u5b9e\u73b0\u8ba1\u5206\u3002\n  <\/p>\n<pre><code class=\"language-cs\">\n    void OnTriggerEnter(Collider collision){\n        Transform arrow = collision.gameObject.transform;\n        if(arrow == null) return;\n        if(arrow.tag == \"Arrow\"){\n            arrow.GetComponent&lt;Rigidbody&gt;().isKinematic = true;\n            arrow.transform.rotation = Quaternion.Euler(0,0,0);\n            arrow.transform.parent = this.transform;\n            arrow.tag = \"onTarget\";\n            \/\/ currentState = AnimalState.Died;\n            animator.SetTrigger(\"Die\");\n            OnDestroy();\n        }else{\n            return ;\n        }\n    }<\/code><\/pre>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 \u4e00\u3001\u7b80\u4ecb 1\u3001\u6e38\u620f\u89c4\u5219 2\u3001\u754c\u9762UI 3\u3001\u6309\u952e\u8bbe\u7f6e \u4e8c\u3001\u5177\u4f53\u5b9e\u73b0 1\u3001\u5730\u56fe\u8bbe\u8ba1 2\u3001\u73a9\u5bb6\u89d2\u8272\u8bbe\u8ba1 a\u3001\u8d44 [&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-2265","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_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0 - \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\/05\/15\/unity3d_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \u4e00\u3001\u7b80\u4ecb 1\u3001\u6e38\u620f\u89c4\u5219 2\u3001\u754c\u9762UI 3\u3001\u6309\u952e\u8bbe\u7f6e \u4e8c\u3001\u5177\u4f53\u5b9e\u73b0 1\u3001\u5730\u56fe\u8bbe\u8ba1 2\u3001\u73a9\u5bb6\u89d2\u8272\u8bbe\u8ba1 a\u3001\u8d44 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-14T22:00:16+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=\"4 \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\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0\",\"datePublished\":\"2025-05-14T22:00:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/\"},\"wordCount\":102,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#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\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/\",\"url\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/\",\"name\":\"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-05-14T22:00:16+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#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\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0\"}]},{\"@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_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0 - \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\/05\/15\/unity3d_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0\/","og_locale":"zh_CN","og_type":"article","og_title":"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u76ee\u5f55 \u4e00\u3001\u7b80\u4ecb 1\u3001\u6e38\u620f\u89c4\u5219 2\u3001\u754c\u9762UI 3\u3001\u6309\u952e\u8bbe\u7f6e \u4e8c\u3001\u5177\u4f53\u5b9e\u73b0 1\u3001\u5730\u56fe\u8bbe\u8ba1 2\u3001\u73a9\u5bb6\u89d2\u8272\u8bbe\u8ba1 a\u3001\u8d44 [&hellip;]","og_url":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-05-14T22:00:16+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":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#article","isPartOf":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/"},"author":{"name":"admin@wunen","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0","datePublished":"2025-05-14T22:00:16+00:00","mainEntityOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/"},"wordCount":102,"commentCount":0,"publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#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\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/","url":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/","name":"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"https:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#primaryimage"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-05-14T22:00:16+00:00","breadcrumb":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#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\/05\/15\/unity3d_%e7%ac%ac%e4%b8%80%e4%ba%ba%e7%a7%b0%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f%e5%ae%9e%e7%8e%b0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"Unity3D_\u7b2c\u4e00\u4eba\u79f0\u5c04\u51fb\u6e38\u620f\u5b9e\u73b0"}]},{"@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\/2265","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=2265"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/2265\/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=2265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=2265"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=2265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}