{"id":382,"date":"2025-04-01T18:00:18","date_gmt":"2025-04-01T10:00:18","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/"},"modified":"2025-04-01T18:00:18","modified_gmt":"2025-04-01T10:00:18","slug":"unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/","title":{"rendered":"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f"},"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\" id=\"content_views\">\n<p id=\"main-toc\">\n   <strong><br \/>\n    \u76ee\u5f55<br \/>\n   <\/strong>\n  <\/p>\n<p id=\"%E4%B8%80%E3%80%81%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C-toc\" style=\"margin-left:0px;\">\n   <a href=\"#%E4%B8%80%E3%80%81%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C\" rel=\"nofollow\"><br \/>\n    \ud83d\udcd6<br \/>\n   <\/a><br \/>\n   <a href=\"#%E4%B8%80%E3%80%81%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C\" rel=\"nofollow\"><br \/>\n    \u4e00\u3001\u51c6\u5907\u5de5\u4f5c<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E4%BA%8C%E3%80%81UI%E7%95%8C%E9%9D%A2%E5%A4%84%E7%90%86%C2%A0-toc\" style=\"margin-left:0px;\">\n   <a href=\"#%E4%BA%8C%E3%80%81UI%E7%95%8C%E9%9D%A2%E5%A4%84%E7%90%86%C2%A0\" rel=\"nofollow\"><br \/>\n    \ud83d\udcfa<br \/>\n   <\/a><br \/>\n   <a href=\"#%E4%BA%8C%E3%80%81UI%E7%95%8C%E9%9D%A2%E5%A4%84%E7%90%86%C2%A0\" rel=\"nofollow\"><br \/>\n    \u4e8c\u3001UI\u754c\u9762\u5904\u7406<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.1%20%E7%99%BB%E5%BD%95UI%E5%B9%B6%E8%BF%9E%E6%8E%A5PUN2%E6%9C%8D%E5%8A%A1%E5%99%A8-toc\" style=\"margin-left:40px;\">\n   <a href=\"#2.1%20%E7%99%BB%E5%BD%95UI%E5%B9%B6%E8%BF%9E%E6%8E%A5PUN2%E6%9C%8D%E5%8A%A1%E5%99%A8\" rel=\"nofollow\"><br \/>\n    \ud83d\udcf1<br \/>\n   <\/a><br \/>\n   <a href=\"#2.1%20%E7%99%BB%E5%BD%95UI%E5%B9%B6%E8%BF%9E%E6%8E%A5PUN2%E6%9C%8D%E5%8A%A1%E5%99%A8\" rel=\"nofollow\"><br \/>\n    2.1 \u767b\u5f55UI\u5e76\u8fde\u63a5PUN2\u670d\u52a1\u5668<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.2%20%E6%B8%B8%E6%88%8F%E5%A4%A7%E5%8E%85%E7%95%8C%E9%9D%A2UI-toc\" style=\"margin-left:40px;\">\n   <a href=\"#2.2%20%E6%B8%B8%E6%88%8F%E5%A4%A7%E5%8E%85%E7%95%8C%E9%9D%A2UI\" rel=\"nofollow\"><br \/>\n    \ud83d\udcf1<br \/>\n   <\/a><br \/>\n   <a href=\"#2.2%20%E6%B8%B8%E6%88%8F%E5%A4%A7%E5%8E%85%E7%95%8C%E9%9D%A2UI\" rel=\"nofollow\"><br \/>\n    2.2 \u6e38\u620f\u5927\u5385\u754c\u9762UI<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.3%20%E5%88%9B%E5%BB%BA%E6%88%BF%E9%97%B4UI-toc\" style=\"margin-left:40px;\">\n   <a href=\"#2.3%20%E5%88%9B%E5%BB%BA%E6%88%BF%E9%97%B4UI\" rel=\"nofollow\"><br \/>\n    \ud83d\udcf1<br \/>\n   <\/a><br \/>\n   <a href=\"#2.3%20%E5%88%9B%E5%BB%BA%E6%88%BF%E9%97%B4UI\" rel=\"nofollow\"><br \/>\n    2.3 \u521b\u5efa\u623f\u95f4UI<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.4%20%E8%BF%9B%E5%85%A5%E6%88%BF%E9%97%B4UI%C2%A0-toc\" style=\"margin-left:40px;\">\n   <a href=\"#2.4%20%E8%BF%9B%E5%85%A5%E6%88%BF%E9%97%B4UI%C2%A0\" rel=\"nofollow\"><br \/>\n    \ud83d\udcf1<br \/>\n   <\/a><br \/>\n   <a href=\"#2.4%20%E8%BF%9B%E5%85%A5%E6%88%BF%E9%97%B4UI%C2%A0\" rel=\"nofollow\"><br \/>\n    2.4 \u8fdb\u5165\u623f\u95f4UI<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.5%20%E7%8E%A9%E5%AE%B6%E5%87%86%E5%A4%87%E7%8A%B6%E6%80%81-toc\" style=\"margin-left:40px;\">\n   <a href=\"#2.5%20%E7%8E%A9%E5%AE%B6%E5%87%86%E5%A4%87%E7%8A%B6%E6%80%81\" rel=\"nofollow\"><br \/>\n    \ud83d\udcf1<br \/>\n   <\/a><br \/>\n   <a href=\"#2.5%20%E7%8E%A9%E5%AE%B6%E5%87%86%E5%A4%87%E7%8A%B6%E6%80%81\" rel=\"nofollow\"><br \/>\n    2.5 \u73a9\u5bb6\u51c6\u5907\u72b6\u6001<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%C2%A02.6%20%E5%8A%A0%E8%BD%BD%E6%88%98%E6%96%97%E5%9C%BA%E6%99%AF-toc\" style=\"margin-left:40px;\">\n   <a href=\"#%C2%A02.6%20%E5%8A%A0%E8%BD%BD%E6%88%98%E6%96%97%E5%9C%BA%E6%99%AF\" rel=\"nofollow\"><br \/>\n    \ud83d\udcf1<br \/>\n   <\/a><br \/>\n   <a href=\"#%C2%A02.6%20%E5%8A%A0%E8%BD%BD%E6%88%98%E6%96%97%E5%9C%BA%E6%99%AF\" rel=\"nofollow\"><br \/>\n    2.6 \u52a0\u8f7d\u6218\u6597\u573a\u666f<br \/>\n   <\/a>\n  <\/p>\n<p id=\"2.7%20%E6%AD%BB%E4%BA%A1UI%E7%95%8C%E9%9D%A2%E5%92%8C%E5%A4%8D%E6%B4%BB%E6%8C%89%E9%92%AE-toc\" style=\"margin-left:40px;\">\n   <a href=\"#2.7%20%E6%AD%BB%E4%BA%A1UI%E7%95%8C%E9%9D%A2%E5%92%8C%E5%A4%8D%E6%B4%BB%E6%8C%89%E9%92%AE\" rel=\"nofollow\"><br \/>\n    \ud83d\udcf1<br \/>\n   <\/a><br \/>\n   <a href=\"#2.7%20%E6%AD%BB%E4%BA%A1UI%E7%95%8C%E9%9D%A2%E5%92%8C%E5%A4%8D%E6%B4%BB%E6%8C%89%E9%92%AE\" rel=\"nofollow\"><br \/>\n    2.7 \u6b7b\u4ea1UI\u754c\u9762\u548c\u590d\u6d3b\u6309\u94ae<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E4%B8%89%E3%80%81%E8%A7%92%E8%89%B2%E6%8E%A7%E5%88%B6%E5%99%A8-toc\" style=\"margin-left:0px;\">\n   <a href=\"#%E4%B8%89%E3%80%81%E8%A7%92%E8%89%B2%E6%8E%A7%E5%88%B6%E5%99%A8\" rel=\"nofollow\"><br \/>\n    \ud83c\udfae<br \/>\n   <\/a><br \/>\n   <a href=\"#%E4%B8%89%E3%80%81%E8%A7%92%E8%89%B2%E6%8E%A7%E5%88%B6%E5%99%A8\" rel=\"nofollow\"><br \/>\n    \u4e09\u3001\u89d2\u8272\u63a7\u5236\u5668<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3.1%20%E7%94%9F%E6%88%90%E8%A7%92%E8%89%B2-toc\" style=\"margin-left:40px;\">\n   <a href=\"#3.1%20%E7%94%9F%E6%88%90%E8%A7%92%E8%89%B2\" rel=\"nofollow\"><br \/>\n    \ud83d\udca3<br \/>\n   <\/a><br \/>\n   <a href=\"#3.1%20%E7%94%9F%E6%88%90%E8%A7%92%E8%89%B2\" rel=\"nofollow\"><br \/>\n    3.1 \u751f\u6210\u89d2\u8272<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3.2%20%E8%A7%92%E8%89%B2%E6%8E%A7%E5%88%B6%E5%92%8C%E6%88%98%E6%96%97%E7%B3%BB%E7%BB%9F-toc\" style=\"margin-left:40px;\">\n   <a href=\"#3.2%20%E8%A7%92%E8%89%B2%E6%8E%A7%E5%88%B6%E5%92%8C%E6%88%98%E6%96%97%E7%B3%BB%E7%BB%9F\" rel=\"nofollow\"><br \/>\n    \ud83d\udca3<br \/>\n   <\/a><br \/>\n   <a href=\"#3.2%20%E8%A7%92%E8%89%B2%E6%8E%A7%E5%88%B6%E5%92%8C%E6%88%98%E6%96%97%E7%B3%BB%E7%BB%9F\" rel=\"nofollow\"><br \/>\n    3.2 \u89d2\u8272\u63a7\u5236\u548c\u6218\u6597\u7cfb\u7edf<br \/>\n   <\/a>\n  <\/p>\n<p id=\"3.3%C2%A0%E6%9E%AA%E7%9A%84%E8%84%9A%E6%9C%AC-toc\" style=\"margin-left:40px;\">\n   <a href=\"#3.3%C2%A0%E6%9E%AA%E7%9A%84%E8%84%9A%E6%9C%AC\" rel=\"nofollow\"><br \/>\n    \ud83d\udca3<br \/>\n   <\/a><br \/>\n   <a href=\"#3.3%C2%A0%E6%9E%AA%E7%9A%84%E8%84%9A%E6%9C%AC\" rel=\"nofollow\"><br \/>\n    3.3\u00a0\u67aa\u7684\u811a\u672c<br \/>\n   <\/a>\n  <\/p>\n<p id=\"%E5%9B%9B%E3%80%81%E9%A1%B9%E7%9B%AE%E6%89%93%E5%8C%85%E5%AF%BC%E5%87%BA%C2%A0-toc\" style=\"margin-left:0px;\">\n   <a href=\"#%E5%9B%9B%E3%80%81%E9%A1%B9%E7%9B%AE%E6%89%93%E5%8C%85%E5%AF%BC%E5%87%BA%C2%A0\" rel=\"nofollow\"><br \/>\n    \u2692\ufe0f<br \/>\n   <\/a><br \/>\n   <a href=\"#%E5%9B%9B%E3%80%81%E9%A1%B9%E7%9B%AE%E6%89%93%E5%8C%85%E5%AF%BC%E5%87%BA%C2%A0\" rel=\"nofollow\"><br \/>\n    \u56db\u3001\u9879\u76ee\u6253\u5305\u5bfc\u51fa<br \/>\n   <\/a>\n  <\/p>\n<hr id=\"hr-toc\"\/>\n<p>\n   \u524d\u4e24\u5929\u6211\u7a81\u53d1\u5947\u60f3\u60f3\u505a\u8054\u673a\u6e38\u620f\uff0c\u5c31\u53bb\u627e\u6559\u7a0b\uff0c\u809d\u4e86\u4e00\u5929\u7ec8\u4e8e\u505a\u51fa\u6765\u4e86\u3002\n  <\/p>\n<hr\/>\n<p>\n   \u505a\u7684\u8fd9\u4e2a\u5b9e\u4f8b\u662f\u901a\u8fc7<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     PUN2<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u5b9e\u73b0\u7684\uff0c\u770b\u4e00\u4e0b\u6548\u679c\uff1a\n  <\/p>\n<p class=\"img-center\">\n<p>\n   \u7533\u8bf7\u597d\u56fd\u533a\u540e\u548c\u670b\u53cb\u5f02\u5730\u516c\u7f51\u8054\u673a\uff1a\n  <\/p>\n<p class=\"img-center\">\n<hr\/>\n<p>\n   \u5148\u8bf4\u4e00\u4e0b\u641c\u5bfb\u8d44\u6599\u8fc7\u7a0b\u4e2d\u627e\u5230\u7684\u5b9e\u73b0<br \/>\n   <em><br \/>\n    <strong><br \/>\n     <span style=\"color:#956fe7;\"><br \/>\n      \u6e38\u620f\u8054\u673a<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n   <\/em><br \/>\n   \u7684\u65b9\u5f0f\uff1a\u6682\u65f6\u5c31\u8bb0\u5f55\u4e86\u8fd911\u4e2a\u3002\n  <\/p>\n<ol>\n<li>\n    Unity\u81ea\u5e26\u7684UNET\uff08Unity Networking\uff09\n   <\/li>\n<li>\n    PUN\uff08Photon Unity Networking\uff09\n   <\/li>\n<li>\n    Mirror\uff1aMirror\u662fUNET\u7684\u73b0\u4ee3\u66ff\u4ee3\u54c1\n   <\/li>\n<li>\n    \u81ea\u5b9a\u4e49\u7f51\u7edc\u89e3\u51b3\u65b9\u6848\n   <\/li>\n<li>\n    Socket\u7f16\u7a0b\uff1a\u7cfb\u7edf\u7ea7\u7684API\uff0c\u901a\u8fc7\u8c03\u7528\u8fd9\u4e9bAPI\u5c31\u53ef\u4ee5\u5b9e\u73b0\u7f51\u7edc\u901a\u8baf\n   <\/li>\n<li>\n    WebSocket\uff1a\u662f\u4e00\u79cd\u5728\u5355\u4e2aTCP\u8fde\u63a5\u4e0a\u8fdb\u884c\u53cc\u5de5\u901a\u4fe1\u7684\u534f\u8bae\uff0c\u53ef\u7528\u4e8e\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u6e38\u620f\u7684\u6570\u636e\u4f20\u8f93\u548c\u5b9e\u65f6\u901a\u4fe1\u3002\n   <\/li>\n<li>\n    MirrorLite\uff1aMirrorLite\u662fMirror\u7684\u8f7b\u91cf\u7ea7\u7248\u672c\n   <\/li>\n<li>\n    \u6811\u8393\u6d3e\u53caLAN\u8fde\u63a5\n   <\/li>\n<li>\n    UnityMultiplayer\n   <\/li>\n<li>\n    \u81ea\u5efa\u57fa\u4e8eTCP\/IP\u7684\u670d\u52a1\u5668\n   <\/li>\n<li>\n    WebRTC\n   <\/li>\n<\/ol>\n<hr\/>\n<p>\n   \u89c6\u9891\u6559\u7a0b\u662f\u5c0f\u7834\u7ad9Up\u4e3b\uff1a\u72ec\u7acb\u5f00\u53d1\u8005C\u9171\uff0c\u4e2a\u4eba\u611f\u89c9\u8fd9\u5957\u6a21\u578b\u548c\u8fd9\u4e2a\u6559\u7a0b\u6cf0\u88e4\u8fa3\uff0c\u80fd\u8ddf\u7740\u505a\u5b8c\u8fd9\u4e2a\u6e38\u620fDemo\u4e5f\u662f\u5f88\u5f00\u5fc3\u7684\uff0c\u4e0b\u9762\u4f9d\u7136\u4ee5\u535a\u5ba2\u7684\u5f62\u5f0f\u8bb0\u5f55\u5b9e\u73b0\u8fd9\u4e2a\u6e38\u620f\u7684\u8fc7\u7a0b\u3002\n  <\/p>\n<h2 id=\"%E4%B8%80%E3%80%81%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C\">\n   \u4e00\u3001\u51c6\u5907\u5de5\u4f5c<br \/>\n  <\/h2>\n<p>\n   \u9996\u5148\u65b0\u5efa\u4e00\u4e2aU3D\u9879\u76ee\u5bfc\u5165\u7d20\u6750\u5305\u3002\n  <\/p>\n<p>\n   <a class=\"has-card\" href=\"https:\/\/download.csdn.net\/download\/qq_48512649\/88858525\" title=\"https:\/\/download.csdn.net\/download\/qq_48512649\/88858525\"><br \/>\n    <span class=\"link-card-box\"><br \/>\n     <span class=\"link-title\"><br \/>\n      https:\/\/download.csdn.net\/download\/qq_48512649\/88858525<br \/>\n     <\/span><br \/>\n     <span class=\"link-link\"><br \/>\n     <\/span><br \/>\n    <\/span><br \/>\n   <\/a><br \/>\n   \u53bbUnity\u5b98\u65b9\u8d44\u6e90\u5546\u5e97\u4e0b\u8f7dPUN2\u63d2\u4ef6\u5bfc\u5165\u5230\u9879\u76ee\u4e2d\n  <\/p>\n<p class=\"img-center\">\n<p>\n   \u8981\u53bb<br \/>\n   <a class=\"link-info\" href=\"\" rel=\"nofollow\"><br \/>\n    PUN2\u5b98\u7f51<br \/>\n   <\/a><br \/>\n   \u7533\u8bf7PUN2\u8d26\u53f7\u83b7\u53d6AppID\uff0c\u83b7\u53d6AppID\u6559\u7a0b\u53c2\u8003\u4e0b\u9762\u8fd9\u7bc7\u6587\u7ae0\uff1a\u4e0d\u540c\u7684\u662fPhoton Type\u8981\u6539\u4e3aPUN\n  <\/p>\n<p class=\"img-center\">\n<p>\n   <a class=\"has-card\" href=\"https:\/\/blog.csdn.net\/weixin_38484443\/article\/details\/125629797\" title=\"PUN-\u6ce8\u518c\u8d26\u53f7\u4ee5\u53ca\u521b\u5efa\u5e94\u7528\uff081\uff09_photon \u6ce8\u518c\u4e0d\u4e86-CSDN\u535a\u5ba2\"><br \/>\n    <span class=\"link-card-box\"><br \/>\n     <span class=\"link-title\"><br \/>\n      PUN-\u6ce8\u518c\u8d26\u53f7\u4ee5\u53ca\u521b\u5efa\u5e94\u7528\uff081\uff09_photon \u6ce8\u518c\u4e0d\u4e86-CSDN\u535a\u5ba2<br \/>\n     <\/span><br \/>\n     <span class=\"link-desc\"><br \/>\n      \u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb898\u6b21\u3002PUN\u6ce8\u518c\u8d26\u53f7\u53ca\u521b\u5efa\u5e94\u7528_photon \u6ce8\u518c\u4e0d\u4e86<br \/>\n     <\/span><br \/>\n     <span class=\"link-link\"><br \/>\n     <\/span><br \/>\n    <\/span><br \/>\n   <\/a>\n  <\/p>\n<p>\n   <a class=\"has-card\" href=\"https:\/\/blog.csdn.net\/qq_37350725\/article\/details\/124657623?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170865675116800225534042%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&amp;request_id=170865675116800225534042&amp;biz_id=0&amp;utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-124657623-null-null.142%5Ev99%5Epc_search_result_base3&amp;utm_term=PUN2%E8%AE%BE%E7%BD%AE%E6%88%90%E4%B8%AD%E5%9B%BD%E5%8C%BA&amp;spm=1018.2226.3001.4187\" title=\"photon pun2 \u8bbe\u7f6e\u4e2d\u56fd\u533a_photon\u4e2d\u56fd\u533a-CSDN\u535a\u5ba2\"><br \/>\n    <span class=\"link-card-box\"><br \/>\n     <span class=\"link-title\"><br \/>\n      photon pun2 \u8bbe\u7f6e\u4e2d\u56fd\u533a_photon\u4e2d\u56fd\u533a-CSDN\u535a\u5ba2<br \/>\n     <\/span><br \/>\n     <span class=\"link-desc\"><br \/>\n      \u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.9k\u6b21\uff0c\u70b9\u8d5e2\u6b21\uff0c\u6536\u85cf14\u6b21\u3002pun2 \u4e2d\u56fd\u533a\u8bbe\u7f6e_photon\u4e2d\u56fd\u533a<br \/>\n     <\/span><br \/>\n     <span class=\"link-link\"><br \/>\n     <\/span><br \/>\n    <\/span><br \/>\n   <\/a><br \/>\n   \u54ce\uff0c\u5c0f\u7f16\u7684\u56fd\u533a\u7533\u8bf7\u8fd8\u6ca1\u56de\u5e94\uff0c\u76ee\u524d\u6211\u53ea\u6d4b\u8bd5\u4e86\u5728\u5c40\u57df\u7f51\u5185\u7684\u8054\u673a\u3002\n  <\/p>\n<p>\n   \u751f\u6210AppID\u540e\u628a\u5b83\u590d\u5236\u5230\u63d2\u4ef6\u4e2d\u53bb\n  <\/p>\n<p class=\"img-center\">\n<p class=\"img-center\">\n<p>\n   \u7c98\u8d34\u751f\u6210\u597d\u7684AppID\uff1a\n  <\/p>\n<p class=\"img-center\">\n<h2 id=\"%E4%BA%8C%E3%80%81UI%E7%95%8C%E9%9D%A2%E5%A4%84%E7%90%86%C2%A0\">\n   \u4e8c\u3001UI\u754c\u9762\u5904\u7406<br \/>\n  <\/h2>\n<h3 id=\"2.1%20%E7%99%BB%E5%BD%95UI%E5%B9%B6%E8%BF%9E%E6%8E%A5PUN2%E6%9C%8D%E5%8A%A1%E5%99%A8\">\n   2.1 \u767b\u5f55UI\u5e76\u8fde\u63a5PUN2\u670d\u52a1\u5668<br \/>\n  <\/h3>\n<p>\n   \u73a9\u5bb6\u767b\u5f55\u573a\u666f\u662f<br \/>\n   <em><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     <strong><br \/>\n      login<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n   <\/em><br \/>\n   \uff0c\u6218\u6597\u573a\u666f\u662f<br \/>\n   <em><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     <strong><br \/>\n      game<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n   <\/em>\n  <\/p>\n<p class=\"img-center\">\n<p>\n   \u53cc\u51fb\u767b\u5f55\u573a\u666f\uff0c\u7f16\u5199<br \/>\n   <span style=\"color:#956fe7;\"><br \/>\n    <strong><br \/>\n     Game<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n   \u811a\u672c\u6302\u8f7d\u5230Game\u4e0a\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing Photon.Pun;\n\npublic class Game : MonoBehaviour\n{\n    public static UIManager uiManager;\n\n    public static bool isLoaded = false;\n\n    private void Awake()\n    {\n        if (isLoaded == true)\n        {\n            Destroy(gameObject);\n        }\n        else\n        {\n            isLoaded = true;\n            DontDestroyOnLoad(gameObject);   \/\/\u8df3\u8f6c\u573a\u666f\u5f53\u524d\u6e38\u620f\u7269\u4f53\u4e0d\u5220\u9664\n            uiManager = new UIManager();\n            uiManager.Init();\n\n            \/\/\u8bbe\u7f6e\u53d1\u9001  \u63a5\u6536\u6d88\u606f\u9891\u7387 \u964d\u4f4e\u5ef6\u8fdf\n            PhotonNetwork.SendRate = 50;\n            PhotonNetwork.SerializationRate = 50;\n        }\n    }\n\n    \/\/ Start is called before the first frame update\n    void Start()\n    {\n        \/\/\u663e\u793a\u767b\u5f55\u754c\u9762\n        uiManager.ShowUI&lt;LoginUI&gt;(\"LoginUI\");\n    }\n\n    \/\/ Update is called once per frame\n    void Update()\n    {\n        \n    }\n}<\/code><\/pre>\n<p>\n   LoginUI\u811a\u672c\uff0c\u5bf9<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     \u5f00\u59cb\u6e38\u620f<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u548c<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     \u9000\u51fa\u6e38\u620f<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u6309\u952e\u7684\u5904\u7406\n  <\/p>\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing UnityEngine.UI;\nusing Photon.Pun;\nusing Photon.Realtime;\n\n\/\/\u767b\u5f55\u754c\u9762\npublic class LoginUI : MonoBehaviour,IConnectionCallbacks\n{\n    \/\/ Start is called before the first frame update\n    void Start()\n    {\n        transform.Find(\"startBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(onStartBtn);\n        transform.Find(\"quitBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(onQuitBtn);\n    }\n\n    private void OnEnable()\n    {\n        PhotonNetwork.AddCallbackTarget(this);  \/\/\u6ce8\u518cpun2\u4e8b\u4ef6\n    }\n\n    private void OnDisable()\n    {\n        PhotonNetwork.RemoveCallbackTarget(this);  \/\/\u6ce8\u9500pun2\u4e8b\u4ef6\n    }\n\n    public void onStartBtn()\n    {\n        Game.uiManager.ShowUI&lt;MaskUI&gt;(\"MaskUI\").ShowMsg(\"\u6b63\u5728\u8fde\u63a5\u670d\u52a1\u5668...\");\n        \n        \/\/\u8fde\u63a5pun2\u670d\u52a1\u5668\n        PhotonNetwork.ConnectUsingSettings();   \/\/\u6210\u529f\u540e\u4f1a\u6267\u884cOnConnectedToMaster\u51fd\u6570\n    }\n\n    public void onQuitBtn()\n    {\n        Application.Quit();\n    }\n\n    public void OnConnected()\n    {\n        \n    }\n\n    \/\/\u8fde\u63a5\u6210\u529f\u540e\u6267\u884c\u7684\u51fd\u6570\n    public void OnConnectedToMaster()\n    {\n        \/\/\u5173\u95ed\u6240\u6709\u754c\u9762\n        Game.uiManager.CloseAllUI();\n        Debug.Log(\"\u8fde\u63a5\u6210\u529f\");\n        \/\/\u663e\u793a\u5927\u5385\u754c\u9762\n        Game.uiManager.ShowUI&lt;LobbyUI&gt;(\"LobbyUI\");\n    }\n\n    \/\/\u65ad\u5f00\u670d\u52a1\u5668\u6267\u884c\u7684\u51fd\u6570\n    public void OnDisconnected(DisconnectCause cause)\n    {\n        Game.uiManager.CloseUI(\"MaskUI\");\n    }\n\n    public void OnRegionListReceived(RegionHandler regionHandler)\n    {\n        \n    }\n\n    public void OnCustomAuthenticationResponse(Dictionary&lt;string, object&gt; data)\n    {\n        \n    }\n\n    public void OnCustomAuthenticationFailed(string debugMessage)\n    {\n        \n    }\n    \n}\n<\/code><\/pre>\n<p>\n   MaskUI\u811a\u672c\u63d0\u4f9b<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     \u906e\u7f69\u754c\u9762<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u6587\u5b57\u663e\u793a\u7684\u516c\u5171\u8c03\u7528\u65b9\u6cd5\n  <\/p>\n<pre><code class=\"language-cs\"> using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n using UnityEngine.UI;\n\n \/\/\u906e\u7f69\u754c\u9762\npublic class MaskUI : MonoBehaviour\n{\n    \/\/ Start is called before the first frame update\n    void Start()\n    {\n        \n    }\n\n    public void ShowMsg(string msg)\n    {\n        transform.Find(\"msg\/bg\/Text\").GetComponent&lt;Text&gt;().text = msg;\n    }\n}\n<\/code><\/pre>\n<p>\n   \u8fde\u63a5\u670d\u52a1\u5668\u6210\u529f\u53ef\u4ee5\u770b\u5230\u63a7\u5236\u53f0\u6253\u5370\u5e76\u8f93\u51fa\n  <\/p>\n<h3 id=\"2.2%20%E6%B8%B8%E6%88%8F%E5%A4%A7%E5%8E%85%E7%95%8C%E9%9D%A2UI\">\n   2.2 \u6e38\u620f\u5927\u5385\u754c\u9762UI<br \/>\n  <\/h3>\n<p>\n   \u7f16\u5199\u811a\u672c<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     LobbyUI<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u5904\u7406\u6e38\u620f\u5927\u5385\u754c\u9762\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\"> using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing Photon.Pun;\nusing Photon.Realtime;\n using UnityEngine.UI;\n     \n \/\/\u5927\u5385\u754c\u9762\npublic class LobbyUI : MonoBehaviourPunCallbacks\n{\n    private TypedLobby lobby;  \/\/\u5927\u5385\u5bf9\u8c61\n\n    private Transform contentTf;\n    private GameObject roomPrefab;\n    void Start()\n    {\n        \/\/\u5173\u95ed\u6309\u94ae\n        transform.Find(\"content\/title\/closeBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(onCloseBtn);\n        \/\/\u521b\u5efa\u623f\u95f4\u6309\u94ae\n        transform.Find(\"content\/createBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(onCreateRoomBtn);\n        \/\/\u5237\u65b0\u6309\u94ae\n        transform.Find(\"content\/updateBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(onUpdateRoomBtn);\n\n        contentTf = transform.Find(\"content\/Scroll View\/Viewport\/Content\");\n        roomPrefab = transform.Find(\"content\/Scroll View\/Viewport\/item\").gameObject;\n        \n        lobby = new TypedLobby(\"fpsLobby\", LobbyType.SqlLobby); \/\/1.\u5927\u5385\u540d\u5b57  2.\u5927\u5385\u7c7b\u578b\uff08\u53ef\u641c\u7d22\uff09\n        \/\/\u8fdb\u5165\u5927\u5385\n        PhotonNetwork.JoinLobby(lobby);\n    }\n    \n    \/\/\u8fdb\u5165\u5927\u5385\u56de\u8c03\n    public override void OnJoinedLobby()\n    { \n        Debug.Log(\"\u8fdb\u5165\u5927\u5385...\");\n    }\n\n    \/\/\u521b\u5efa\u623f\u95f4\n    public void onCreateRoomBtn()\n    {\n        Game.uiManager.ShowUI&lt;CreateRoomUI&gt;(\"CreateRoomUI\");\n    }\n\n    \/\/\u5173\u95ed\u5927\u5385\u754c\u9762\n    public void onCloseBtn()\n    {\n        \/\/\u65ad\u5f00\u8fde\u63a5\n        PhotonNetwork.Disconnect();\n        Game.uiManager.CloseUI(gameObject.name);\n        \/\/\u663e\u793a\u767b\u5f55\u754c\u9762\n        Game.uiManager.ShowUI&lt;LoginUI&gt;(\"LoginUI\");\n    }\n    \n    \/\/\u5237\u65b0\u623f\u95f4\u5217\u8868\n    public void onUpdateRoomBtn()\n    {\n        Game.uiManager.ShowUI&lt;MaskUI&gt;(\"MaskUI\").ShowMsg(\"\u5237\u65b0\u4e2d...\");\n        PhotonNetwork.GetCustomRoomList(lobby, \"1\");   \/\/\u6267\u884c\u8be5\u65b9\u6cd5\u540e\u4f1a\u89e6\u53d1OnRoomListUpdate\u56de\u8c03\n    }\n    \n    \/\/\u6e05\u9664\u5df2\u7ecf\u5b58\u5728\u7684\u623f\u95f4\u7269\u4f53\n    private void ClearRoomList()\n    {\n        while (contentTf.childCount != 0)\n        {\n            DestroyImmediate(contentTf.GetChild(0).gameObject);\n        }\n    }\n\n    \/\/\u5237\u65b0\u623f\u95f4\u540e\u7684\u56de\u8c03\n    public override void OnRoomListUpdate(List&lt;RoomInfo&gt; roomList)\n    {\n        Game.uiManager.CloseUI(\"MaskUI\");\n        Debug.Log(\"\u623f\u95f4\u5237\u65b0\");\n\n        ClearRoomList();\n        for (int i = 0; i &lt; roomList.Count; i++)\n        {\n            GameObject obj = Instantiate(roomPrefab, contentTf);\n            obj.SetActive(true);\n            string roomName = roomList[i].Name;  \/\/\u623f\u95f4\u540d\u79f0\n            obj.transform.Find(\"roomName\").GetComponent&lt;Text&gt;().text = roomName;\n            obj.transform.Find(\"joinBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(delegate()\n            {\n                Debug.Log(roomName);\n                \/\/\u52a0\u5165\u623f\u95f4\n                Game.uiManager.ShowUI&lt;MaskUI&gt;(\"MaskUI\").ShowMsg(\"\u52a0\u5165\u4e2d...\");\n\n                PhotonNetwork.JoinRoom(roomName); \/\/\u52a0\u5165\u623f\u95f4\n            });\n        }\n    }\n\n    public override void OnJoinedRoom()\n    {\n        \/\/\u52a0\u5165\u623f\u95f4\u56de\u8c03\n        Game.uiManager.CloseAllUI();\n        Game.uiManager.ShowUI&lt;RoomUI&gt;(\"RoomUI\");\n    }\n\n    public override void OnJoinRoomFailed(short returnCode, string message)\n    {\n        \/\/\u52a0\u5165\u623f\u95f4\u5931\u8d25\n        Game.uiManager.CloseUI(\"MaskUI\");\n    }\n}\n<\/code><\/pre>\n<h3 id=\"2.3%20%E5%88%9B%E5%BB%BA%E6%88%BF%E9%97%B4UI\">\n   2.3 \u521b\u5efa\u623f\u95f4UI<br \/>\n  <\/h3>\n<p>\n   \u521b\u5efa\u623f\u95f4\u811a\u672c<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     CreateRoomUI<br \/>\n    <\/span><br \/>\n   <\/strong>\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing Photon.Pun;\nusing Photon.Realtime;\nusing UnityEngine.UI;\n\npublic class CreateRoomUI : MonoBehaviourPunCallbacks\n{\n    private InputField roomNameInput;  \/\/\u623f\u95f4\u540d\u79f0\n    void Start()\n    {\n        transform.Find(\"bg\/title\/closeBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(onCloseBtn);\n        transform.Find(\"bg\/okBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(onCreateBtn);\n        roomNameInput = transform.Find(\"bg\/InputField\").GetComponent&lt;InputField&gt;();\n        \n        \/\/\u968f\u673a\u4e00\u4e2a\u623f\u95f4\u540d\u79f0\n        roomNameInput.text = \"room_\" + Random.Range(1, 9999); \n    }\n\n    \/\/\u521b\u5efa\u623f\u95f4\n    public void onCreateBtn()\n    {\n        Game.uiManager.ShowUI&lt;MaskUI&gt;(\"MaskUI\").ShowMsg(\"\u521b\u5efa\u4e2d...\");\n        RoomOptions room = new RoomOptions();\n        room.MaxPlayers = 8;  \/\/\u623f\u95f4\u6700\u5927\u73a9\u5bb6\u6570\n        PhotonNetwork.CreateRoom(roomNameInput.text, room);  \/\/1.\u623f\u95f4\u540d\u79f0 2.\u623f\u95f4\u7684\u5bf9\u8c61\u53c2\u6570\n    }\n\n    \/\/\u5173\u95ed\u6309\u94ae\n    public void onCloseBtn()\n    {\n        Game.uiManager.CloseUI(gameObject.name);\n    }\n    \n    \/\/\u521b\u5efa\u6210\u529f\u540e\u56de\u8c03\n    public override void OnCreatedRoom()\n    {\n        Debug.Log(\"\u521b\u5efa\u6210\u529f\");\n        Game.uiManager.CloseAllUI();\n        \/\/\u663e\u793a\u623f\u95f4UI\n        Game.uiManager.ShowUI&lt;RoomUI&gt;(\"RoomUI\");\n    }\n    \n    \/\/\u521b\u5efa\u5931\u8d25\n    public override void OnCreateRoomFailed(short returnCode, string message)\n    {\n        Game.uiManager.CloseUI(\"MaskUI\");\n    }\n}\n<\/code><\/pre>\n<h3 id=\"2.4%20%E8%BF%9B%E5%85%A5%E6%88%BF%E9%97%B4UI%C2%A0\">\n   2.4 \u8fdb\u5165\u623f\u95f4UI<br \/>\n  <\/h3>\n<p>\n   \u521b\u5efa\u623f\u95f4\u5b8c\u6210\u540e\u4f1a\u8fdb\u5165\u5230\u623f\u95f4\u91cc\u00a0 \u7f16\u5199<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     RoomUI<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u811a\u672c\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing Photon.Pun;\nusing Photon.Realtime;\nusing UnityEngine.UI;\n\npublic class RoomUI : MonoBehaviour,IInRoomCallbacks\n{\n    Transform startTf; \n    Transform contentTf;\n    GameObject roomPrefab;\n    public List&lt;RoomItem&gt; roomList;\n    private void Awake()\n    {\n        roomList = new List&lt;RoomItem&gt;();\n        contentTf = transform.Find(\"bg\/Content\");\n        roomPrefab = transform.Find(\"bg\/roomItem\").gameObject;\n        transform.Find(\"bg\/title\/closeBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(onCloseBtn);\n        startTf = transform.Find(\"bg\/startBtn\");\n        startTf.GetComponent&lt;Button&gt;().onClick.AddListener(onStartBtn);\n\n        PhotonNetwork.AutomaticallySyncScene = true; \/\/\u6267\u884cPhotonNetwork.LoadLevel\u52a0\u8f7d\u573a\u666f\u7684\u65f6\u5019 \u5176\u4ed6\u73a9\u5bb6\u4e5f\u8df3\u8f6c\u76f8\u540c\u7684\u573a\u666f\n    }\n\n    void Start()\n    {\n        \/\/\u751f\u6210\u623f\u95f4\u91cc\u7684\u73a9\u5bb6\u9879\n        for (int i = 0; i &lt; PhotonNetwork.PlayerList.Length; i++)\n        {\n            Player p = PhotonNetwork.PlayerList[i];\n            CreateRoomItem(p);\n        }\n    }\n\n    private void OnEnable()\n    {\n        PhotonNetwork.AddCallbackTarget(this);\n    }\n\n    private void OnDisable()\n    {\n        PhotonNetwork.RemoveCallbackTarget(this);\n    }\n\n    \/\/\u751f\u6210\u73a9\u5bb6\n    public void CreateRoomItem(Player p)\n    {\n        GameObject obj = Instantiate(roomPrefab, contentTf);\n        obj.SetActive(true);\n        RoomItem item = obj.AddComponent&lt;RoomItem&gt;();\n        item.owerId = p.ActorNumber;  \/\/\u73a9\u5bb6\u7f16\u53f7\n        roomList.Add(item);\n\n        object val;\n        if (p.CustomProperties.TryGetValue(\"IsReady\", out val))\n        {\n            item.IsReady = (bool)val;\n        }\n    }\n\n    \/\/\u5220\u9664\u79bb\u5f00\u623f\u95f4\u7684\u73a9\u5bb6\n    public void DeleteRoomItem(Player p)\n    {\n        RoomItem item = roomList.Find((RoomItem _item) =&gt; { return p.ActorNumber == _item.owerId; });\n        if (item != null)\n        {\n            Destroy(item.gameObject);\n            roomList.Remove(item);\n        }\n    }\n\n    \/\/\u5173\u95ed\n    void onCloseBtn()\n    {\n        \/\/\u65ad\u5f00\u8fde\u63a5\n        PhotonNetwork.Disconnect();\n        Game.uiManager.CloseUI(gameObject.name);\n        Game.uiManager.ShowUI&lt;LoginUI&gt;(\"LoginUI\");\n    }\n    \n    \/\/\u5f00\u59cb\u6e38\u620f\n    void onStartBtn()\n    {\n         \/\/\u52a0\u8f7d\u573a\u666f \u8ba9\u623f\u95f4\u91cc\u7684\u73a9\u5bb6\u4e5f\u52a0\u8f7d\u573a\u666f\n         PhotonNetwork.LoadLevel(\"game\");\n    }\n\n    \/\/\u65b0\u73a9\u5bb6\u8fdb\u5165\u623f\u95f4\n    public void OnPlayerEnteredRoom(Player newPlayer)\n    {\n        CreateRoomItem(newPlayer);\n    }\n\n    \/\/\u623f\u95f4\u91cc\u7684\u5176\u4ed6\u73a9\u5bb6\u79bb\u5f00\u623f\u95f4\n    public void OnPlayerLeftRoom(Player otherPlayer)\n    {\n        DeleteRoomItem(otherPlayer);\n    }\n\n    public void OnRoomPropertiesUpdate(ExitGames.Client.Photon.Hashtable propertiesThatChanged)\n    {\n        \n    }\n\n    \/\/\u73a9\u5bb6\u81ea\u5b9a\u4e49\u53c2\u6570\u66f4\u65b0\u56de\u8c03\n    public void OnPlayerPropertiesUpdate(Player targetPlayer, ExitGames.Client.Photon.Hashtable changedProps)\n    {\n        RoomItem item = roomList.Find((_item) =&gt; { return _item.owerId == targetPlayer.ActorNumber; });\n        if (item != null)\n        {\n            item.IsReady = (bool)changedProps[\"IsReady\"];\n            item.ChangeReady(item.IsReady);\n        }\n        \n        \/\/\u5982\u679c\u662f\u4e3b\u673a\u73a9\u5bb6\u5224\u65ad\u6240\u6709\u73a9\u5bb6\u7684\u51c6\u5907\u72b6\u6001\n        if (PhotonNetwork.IsMasterClient)\n        {\n            bool isAllReady = true;\n            for (int i = 0; i &lt; roomList.Count; i++)\n            {\n                if (roomList[i].IsReady == false)\n                {\n                    isAllReady = false;\n                    break;\n                }\n            }\n            startTf.gameObject.SetActive(isAllReady); \/\/\u5f00\u59cb\u6309\u94ae\u662f\u5426\u663e\u793a\n        }\n    }\n\n    public void OnMasterClientSwitched(Player newMasterClient)\n    {\n        \n    }\n}\n<\/code><\/pre>\n<h3 id=\"2.5%20%E7%8E%A9%E5%AE%B6%E5%87%86%E5%A4%87%E7%8A%B6%E6%80%81\">\n   2.5 \u73a9\u5bb6\u51c6\u5907\u72b6\u6001<br \/>\n  <\/h3>\n<p>\n   \u73a9\u5bb6\u8fdb\u5165\u623f\u95f4\u540e\u4f1a\u663e\u793a\u4fe1\u606f\u548c\u51c6\u5907\u72b6\u51b5\uff0c\u7f16\u5199<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     RoomItem<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u811a\u672c\u5b9e\u73b0\u3002\u53ea\u6709\u623f\u95f4\u5185\u6240\u6709\u73a9\u5bb6\u90fd\u5904\u4e8e\u51c6\u5907\u72b6\u6001\u623f\u4e3b\u624d\u80fd\u5f00\u59cb\u6e38\u620f\u3002\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing Photon.Pun;\nusing Photon.Realtime;\nusing UnityEngine.UI;\n\npublic class RoomItem : MonoBehaviour\n{\n\n    public int owerId;  \/\/\u73a9\u5bb6\u7f16\u53f7\n    public bool IsReady = false; \/\/\u662f\u5426\u51c6\u5907\n    void Start()\n    {\n        if (owerId == PhotonNetwork.LocalPlayer.ActorNumber)\n        {\n            transform.Find(\"Button\").GetComponent&lt;Button&gt;().onClick.AddListener(OnReadyBtn);\n        }\n        else\n        {\n            transform.Find(\"Button\").GetComponent&lt;Image&gt;().color = Color.black;\n        }\n\n        ChangeReady(IsReady);\n    }\n\n    public void OnReadyBtn()\n    {\n        IsReady = !IsReady;\n\n        ExitGames.Client.Photon.Hashtable table = new ExitGames.Client.Photon.Hashtable();\n\n        table.Add(\"IsReady\", IsReady);\n\n        PhotonNetwork.LocalPlayer.SetCustomProperties(table); \/\/\u8bbe\u7f6e\u81ea\u5b9a\u4e49\u53c2\u6570\n\n        ChangeReady(IsReady);\n    }\n\n    public void ChangeReady(bool isReady)\n    {\n        transform.Find(\"Button\/Text\").GetComponent&lt;Text&gt;().text = isReady == true ? \"\u5df2\u51c6\u5907\" : \"\u672a\u51c6\u5907\";\n    }\n}<\/code><\/pre>\n<h3 id=\"%C2%A02.6%20%E5%8A%A0%E8%BD%BD%E6%88%98%E6%96%97%E5%9C%BA%E6%99%AF\">\n   2.6 \u52a0\u8f7d\u6218\u6597\u573a\u666f<br \/>\n  <\/h3>\n<p>\n   \u53cc\u51fb\u5207\u6362\u5230\u6218\u6597\u573a\u666f<br \/>\n   <em><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     <strong><br \/>\n      game<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n   <\/em><br \/>\n   \u4e2d\uff0c\u7f16\u5199<br \/>\n   <strong><br \/>\n    <em><br \/>\n     <span style=\"color:#956fe7;\"><br \/>\n      FightManager<br \/>\n     <\/span><br \/>\n    <\/em><br \/>\n   <\/strong><br \/>\n   \u811a\u672c\u6302\u8f7d\u5230<br \/>\n   <em><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     <strong><br \/>\n      fight<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n   <\/em><br \/>\n   \u4e0a\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing Photon.Pun;\n\npublic class FightManager : MonoBehaviour\n{\n    private void Awake()\n    {\n        \/\/\u9690\u85cf\u9f20\u6807\n        Cursor.lockState = CursorLockMode.Locked;\n        Cursor.visible = false;\n        \n        \/\/\u5173\u95ed\u6240\u6709\u754c\u9762\n        Game.uiManager.CloseAllUI();\n        \/\/\u663e\u793a\u6218\u6597\u754c\u9762\n        Game.uiManager.ShowUI&lt;FightUI&gt;(\"FightUI\");\n\n        Transform pointTf = GameObject.Find(\"Point\").transform;\n\n        Vector3 pos = pointTf.GetChild(Random.Range(0, pointTf.childCount)).position;\n        \n        \/\/\u5b9e\u4f8b\u5316\u89d2\u8272\n        PhotonNetwork.Instantiate(\"Player\", pos, Quaternion.identity);  \/\/\u5b9e\u4f8b\u5316\u7684\u8d44\u6e90\u8981\u653e\u5728Resources\u6587\u4ef6\u5939\n    }\n}<\/code><\/pre>\n<p>\n   \u7f16\u5199\u6218\u6597\u573a\u666fUI\u754c\u9762\u5904\u7406\u811a\u672c<br \/>\n   <em><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     <strong><br \/>\n      FightUI<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n   <\/em>\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing UnityEngine.UI;\n\npublic class FightUI : MonoBehaviour\n{\n    private Image bloodImg;\n    void Start()\n    {\n        bloodImg = transform.Find(\"blood\").GetComponent&lt;Image&gt;();\n    }\n    \n    \/\/\u66f4\u65b0\u5b50\u5f39\u4e2a\u6570\u663e\u793a\n    public void UpdateBulletCount(int count)\n    {\n        transform.Find(\"bullet\/Text\").GetComponent&lt;Text&gt;().text = count.ToString();\n    }\n\n    \/\/\u66f4\u65b0\u8840\u91cf\n    public void UpdateHp(float cur, float max)\n    {\n        transform.Find(\"hp\/fill\").GetComponent&lt;Image&gt;().fillAmount = cur \/ max;\n        transform.Find(\"hp\/Text\").GetComponent&lt;Text&gt;().text = cur + \"\/\" + max;\n    }\n\n    public void UpdateBlood()\n    {\n        StopAllCoroutines();\n        StartCoroutine(UpdateBloodCo());\n    }\n\n    public IEnumerator UpdateBloodCo()\n    {\n        bloodImg.color = Color.white;\n        Color color = bloodImg.color;\n        float t = 0.35f;\n        while (t &gt;= 0)\n        {\n            t -= Time.deltaTime;\n            color.a = Mathf.Abs(Mathf.Sin(Time.realtimeSinceStartup));\n            bloodImg.color = color;\n\n            yield return null;\n        }\n\n        color.a = 0;\n        bloodImg.color = color;\n    }\n}\n<\/code><\/pre>\n<h3 id=\"2.7%20%E6%AD%BB%E4%BA%A1UI%E7%95%8C%E9%9D%A2%E5%92%8C%E5%A4%8D%E6%B4%BB%E6%8C%89%E9%92%AE\">\n   2.7 \u6b7b\u4ea1UI\u754c\u9762\u548c\u590d\u6d3b\u6309\u94ae<br \/>\n  <\/h3>\n<p>\n   \u7f16\u5199\u811a\u672c<br \/>\n   <em><br \/>\n    <strong><br \/>\n     <span style=\"color:#956fe7;\"><br \/>\n      LossUI<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n   <\/em>\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing UnityEngine.UI;\n\npublic class LossUI : MonoBehaviour\n{\n    public System.Action onClickCallBack;\n    \/\/ Start is called before the first frame update\n    void Start()\n    {\n        transform.Find(\"resetBtn\").GetComponent&lt;Button&gt;().onClick.AddListener(OnClickBtn);\n    }\n\n    public void OnClickBtn()\n    {\n        if (onClickCallBack != null)\n        {\n            onClickCallBack();\n        }\n\n        Game.uiManager.CloseUI(gameObject.name);\n    }\n}<\/code><\/pre>\n<hr\/>\n<h2 id=\"%E4%B8%89%E3%80%81%E8%A7%92%E8%89%B2%E6%8E%A7%E5%88%B6%E5%99%A8\">\n   \u4e09\u3001\u89d2\u8272\u63a7\u5236\u5668<br \/>\n  <\/h2>\n<h3 id=\"3.1%20%E7%94%9F%E6%88%90%E8%A7%92%E8%89%B2\">\n   3.1 \u751f\u6210\u89d2\u8272<br \/>\n  <\/h3>\n<p>\n   \u7ed9\u89d2\u8272<br \/>\n   <strong><br \/>\n    <em><br \/>\n     <span style=\"color:#956fe7;\"><br \/>\n      Player<br \/>\n     <\/span><br \/>\n    <\/em><br \/>\n   <\/strong><br \/>\n   \u6302\u8f7d<br \/>\n   <strong><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     Photon View<br \/>\n    <\/span><br \/>\n   <\/strong><br \/>\n   \u7ec4\u4ef6\uff0c\u5b9e\u4f8b\u5316\u751f\u6210\u73a9\u5bb6\u7684\u4ee3\u7801\u6211\u4eec\u5df2\u7ecf\u5728<br \/>\n   <strong><br \/>\n    <em><br \/>\n     <span style=\"color:#956fe7;\"><br \/>\n      FightManager<br \/>\n     <\/span><br \/>\n    <\/em><br \/>\n   <\/strong><br \/>\n   \u811a\u672c\u4e2d\u5b9e\u73b0\u4e86\u3002\n  <\/p>\n<p class=\"img-center\">\n<h3 id=\"3.2%20%E8%A7%92%E8%89%B2%E6%8E%A7%E5%88%B6%E5%92%8C%E6%88%98%E6%96%97%E7%B3%BB%E7%BB%9F\">\n   3.2 \u89d2\u8272\u63a7\u5236\u548c\u6218\u6597\u7cfb\u7edf<br \/>\n  <\/h3>\n<p>\n   \u7f16\u5199\u89d2\u8272\u63a7\u5236\u811a\u672c<br \/>\n   <span style=\"color:#956fe7;\"><br \/>\n    <strong><br \/>\n     PlayerController<br \/>\n    <\/strong><br \/>\n   <\/span><br \/>\n   \u6302\u8f7d\u5230\u89d2\u8272\u4e0a\uff0c\u6218\u6597\u7cfb\u7edf\u7684\u903b\u8f91\u4e5f\u5728\u8fd9\u4e2a\u811a\u672c\u91cc\uff0c\u5176\u4e2d\u7684\u53c2\u6570\u6570\u503c\u53ef\u4ee5\u53c2\u8003\u4e0b\u56fe\uff1a\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing Photon.Pun;\nusing Photon.Realtime;\n\n\/\/\u89d2\u8272\u63a7\u5236\u5668 \npublic class PlayerController : MonoBehaviourPun,IPunObservable\n{\n\n    \/\/\u7ec4\u4ef6\n    public Animator ani;\n    public Rigidbody body;\n    public Transform camTf;  \/\/\u8ddf\u968f\u7684\u76f8\u673a\n    \n    \/\/\u6570\u503c\n    public int CurHp = 10;\n    public int MaxHp = 10;\n    public float MoveSpeed = 5f;\n\n    public float H; \/\/\u6c34\u5e73\u503c\n    public float V; \/\/\u5782\u76f4\u503c\n    public Vector3 dir; \/\/\u79fb\u52a8\u65b9\u5411\n\n    public Vector3 offset; \/\/\u6444\u50cf\u673a\u4e0e\u89d2\u8272\u4e4b\u95f4\u7684\u504f\u79fb\u503c\n\n    public float Mouse_X; \/\/\u9f20\u6807\u504f\u79fb\u503c\n    public float Mouse_Y;\n    public float scroll; \/\/\u9f20\u6807\u6eda\u8f6e\u503c\n    public float Angle_X; \/\/x\u8f74\u7684\u65cb\u8f6c\u89d2\u5ea6\n    public float Angle_Y; \/\/y\u8f74\u7684\u65cb\u8f6c\u89d2\u5ea6\n\n    public Quaternion camRotation; \/\/\u6444\u50cf\u673a\u65cb\u8f6c\u7684\u56db\u5143\u6570\n\n    public Gun gun; \/\/\u67aa\u7684\u811a\u672c\n    \n    \/\/\u58f0\u97f3\n    public AudioClip reloadClip;\n    public AudioClip shootClip;\n\n    public bool isDie = false;\n\n    public Vector3 currentPos;\n    public Quaternion currentRotation;\n    \n    void Start()\n    {\n        Angle_X = transform.eulerAngles.x;\n        Angle_Y = transform.eulerAngles.y;\n        \n        ani = GetComponent&lt;Animator&gt;();\n        body = GetComponent&lt;Rigidbody&gt;();\n        gun = GetComponentInChildren&lt;Gun&gt;();\n        camTf = Camera.main.transform;\n        currentPos = transform.position;\n        currentRotation = transform.rotation;\n        if (photonView.IsMine)\n        {\n            Game.uiManager.GetUI&lt;FightUI&gt;(\"FightUI\").UpdateHp(CurHp, MaxHp);\n        }\n    }\n\n\n    void Update()\n    {\n        \/\/\u5224\u65ad\u662f\u5426\u662f\u672c\u673a\u73a9\u5bb6  \u53ea\u80fd\u64cd\u4f5c\u672c\u673a\u89d2\u8272\n        if (photonView.IsMine)\n        {\n            if (isDie == true)\n            {\n                return;\n            }\n            UpdatePosition();\n            UpdateRotation();\n            InputCtl();\n        }\n        else\n        {\n            UpdateLogic();\n        }\n    }\n    \n    \/\/\u5176\u4ed6\u89d2\u8272\u66f4\u65b0\u53d1\u9001\u8fc7\u6765\u7684\u6570\u636e\uff08\u4f4d\u7f6e \u65cb\u8f6c\uff09\n    public void UpdateLogic()\n    {\n        transform.position = Vector3.Lerp(transform.position, currentPos, Time.deltaTime * MoveSpeed * 10);\n        transform.rotation = Quaternion.Slerp(transform.rotation, currentRotation, Time.deltaTime * 500);\n    }\n\n    private void LateUpdate()\n    {\n        ani.SetFloat(\"Horizontal\", H);\n        ani.SetFloat(\"Vertical\", V);\n        ani.SetBool(\"isDie\", isDie);\n    }\n\n    \/\/\u66f4\u65b0\u4f4d\u7f6e\n    public void UpdatePosition()\n    {\n        H = Input.GetAxisRaw(\"Horizontal\");\n        V = Input.GetAxisRaw(\"Vertical\");\n        dir = camTf.forward * V + camTf.right * H;\n        body.MovePosition(transform.position + dir * Time.deltaTime * MoveSpeed);\n    }\n    \n    \/\/\u66f4\u65b0\u65cb\u8f6c\uff08\u540c\u65f6\u8bbe\u7f6e\u6444\u50cf\u673a\u7684\u4f4d\u7f6e\u7684\u65cb\u8f6c\u503c\uff09\n    public void UpdateRotation()\n    {\n        Mouse_X = Input.GetAxisRaw(\"Mouse X\");\n        Mouse_Y = Input.GetAxisRaw(\"Mouse Y\");\n        scroll = Input.GetAxis(\"Mouse ScrollWheel\");\n\n        Angle_X = Angle_X - Mouse_Y;\n        Angle_Y = Angle_Y + Mouse_X;\n\n        Angle_X = ClampAngle(Angle_X, -60, 60);\n        Angle_Y = ClampAngle(Angle_Y, -360, 360);\n\n        camRotation = Quaternion.Euler(Angle_X, Angle_Y, 0);\n\n        camTf.rotation = camRotation;\n\n        offset.z += scroll;\n        \n        camTf.position = transform.position + camTf.rotation * offset;\n\n        transform.eulerAngles = new Vector3(0, camTf.eulerAngles.y, 0);\n    }\n\n    \/\/\u89d2\u8272\u64cd\u4f5c\n    public void InputCtl()\n    {\n        if (Input.GetMouseButtonDown(0))\n        {\n            \/\/\u5224\u65ad\u5b50\u5f39\u4e2a\u6570\n            if (gun.BulletCount &gt; 0)\n            {\n                \/\/\u5982\u679c\u6b63\u5728\u64ad\u653e\u586b\u5145\u5b50\u5f39\u7684\u52a8\u4f5c\u4e0d\u80fd\u5f00\u67aa\n                if (ani.GetCurrentAnimatorStateInfo(1).IsName(\"Reload\"))\n                {\n                    return;\n                }\n\n                gun.BulletCount--;\n                Game.uiManager.GetUI&lt;FightUI&gt;(\"FightUI\").UpdateBulletCount(gun.BulletCount);\n                \/\/\u64ad\u653e\u5f00\u706b\u52a8\u753b\n                ani.Play(\"Fire\", 1, 0);\n\n                StopAllCoroutines();\n                StartCoroutine(AttackCo());\n            }\n        }\n\n        if (Input.GetKeyDown(KeyCode.R))\n        {\n            \/\/\u586b\u5145\u5b50\u5f39\n            AudioSource.PlayClipAtPoint(reloadClip, transform.position); \/\/\u64ad\u653e\u586b\u5145\u5b50\u5f39\u7684\u58f0\u97f3\n            ani.Play(\"Reload\");\n            gun.BulletCount = 10;\n            Game.uiManager.GetUI&lt;FightUI&gt;(\"FightUI\").UpdateBulletCount(gun.BulletCount);\n        }\n    }\n    \n    \/\/\u653b\u51fb\u534f\u540c\u7a0b\u5e8f\n    IEnumerator AttackCo()\n    {\n        \/\/\u5ef6\u8fdf0.1\u79d2\u624d\u53d1\u5c04\u5b50\u5f39\n        yield return new WaitForSeconds(0.1f);\n        \/\/\u64ad\u653e\u5c04\u51fb\u97f3\u6548\n        AudioSource.PlayClipAtPoint(shootClip, transform.position);\n        \n        \/\/\u5c04\u7ebf\u68c0\u6d4b \u9f20\u6807\u4e2d\u5fc3\u70b9\u53d1\u9001\u5c04\u7ebf\n        Ray ray = Camera.main.ScreenPointToRay(new Vector3(Screen.width * 0.5f, Screen.height * 0.5f,Input.mousePosition.z));\n        \/\/\u5c04\u7ebf\u53ef\u4ee5\u6539\u6210\u5728\u67aa\u53e3\u4f4d\u7f6e\u4e3a\u8d77\u59cb\u70b9 \u53d1\u9001\uff0c\u907f\u514d\u5c04\u7ebf\u5c04\u5230\u81ea\u8eab\n\n        RaycastHit hit;\n        if (Physics.Raycast(ray, out hit, 10000, LayerMask.GetMask(\"Player\")))\n        {\n            Debug.Log(\"\u5c04\u5230\u89d2\u8272\");\n            hit.transform.GetComponent&lt;PlayerController&gt;().GetHit();\n        }\n\n        photonView.RPC(\"AttackRpc\", RpcTarget.All);  \/\/\u6240\u6709\u73a9\u5bb6\u6267\u884c AttackRpc \u51fd\u6570\n    }\n\n    [PunRPC]\n    public void AttackRpc()\n    {\n        gun.Attack();\n    }\n\n    \/\/\u53d7\u4f24\n    public void GetHit()\n    {\n        if (isDie == true)\n        {\n            return;\n        }\n        \n        \/\/\u540c\u6b65\u6240\u6709\u89d2\u8272\u53d7\u4f24\n        photonView.RPC(\"GetHitRPC\", RpcTarget.All);\n    }\n\n    [PunRPC]\n    public void GetHitRPC()\n    {\n        CurHp -= 1;  \/\/\u6263\u4e00\u6ef4\u8840\n        if (CurHp &lt;= 0)\n        {\n            CurHp = 0;\n            isDie = true;\n        }\n\n        if (photonView.IsMine)\n        {\n            Game.uiManager.GetUI&lt;FightUI&gt;(\"FightUI\").UpdateHp(CurHp, MaxHp);\n            Game.uiManager.GetUI&lt;FightUI&gt;(\"FightUI\").UpdateBlood();\n            \n            if (CurHp == 0)\n            {\n                Invoke(\"gameOver\", 3);  \/\/3\u79d2\u540e\u663e\u793a\u5931\u8d25\u754c\u9762       \n            }\n        }\n    }\n\n    private void gameOver()\n    {\n        \/\/\u663e\u793a\u9f20\u6807\n        Cursor.visible = true;\n        Cursor.lockState = CursorLockMode.None;\n        \/\/\u663e\u793a\u5931\u8d25\u754c\u9762\n        Game.uiManager.ShowUI&lt;LossUI&gt;(\"LossUI\").onClickCallBack = OnReset;\n    }\n\n    \/\/\u590d\u6d3b\n    public void OnReset()\n    {\n        \/\/\u9690\u85cf\u9f20\u6807\n        Cursor.visible = false;\n        Cursor.lockState = CursorLockMode.Locked;\n        photonView.RPC(\"OnResetRPC\", RpcTarget.All);\n    }\n\n    [PunRPC]\n    public void OnResetRPC()\n    {\n        isDie = false;\n        CurHp = MaxHp;\n        if (photonView.IsMine)\n        {\n            Game.uiManager.GetUI&lt;FightUI&gt;(\"FightUI\").UpdateHp(CurHp, MaxHp);\n        }\n    }\n\n    \/\/\u9650\u5236\u89d2\u5ea6\u5728-360 \u5230 360\u4e4b\u95f4\n    public float ClampAngle(float val, float min, float max)\n    {\n        if (val &gt; 360)\n        {\n            val -= 360;\n        }\n\n        if (val &lt; -360)\n        {\n            val += 360;\n        }\n\n        return Mathf.Clamp(val, min, max);\n    }\n\n    private void OnAnimatorIK(int layerIndex)\n    {\n        if (ani != null)\n        {\n            Vector3 angle = ani.GetBoneTransform(HumanBodyBones.Chest).localEulerAngles;\n            angle.x = Angle_X;\n            ani.SetBoneLocalRotation(HumanBodyBones.Chest, Quaternion.Euler(angle));\n        }\n    }\n\n    public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)\n    {\n        if (stream.IsWriting)\n        {\n            \/\/\u53d1\u9001\u6570\u636e\n            stream.SendNext(H);\n            stream.SendNext(V);\n            stream.SendNext(Angle_X);\n            stream.SendNext(transform.position);\n            stream.SendNext(transform.rotation);\n        }\n        else\n        {\n            \/\/\u63a5\u6536\u6570\u636e\n            H = (float)stream.ReceiveNext();\n            V = (float)stream.ReceiveNext();\n            Angle_X = (float)stream.ReceiveNext();\n            currentPos = (Vector3)stream.ReceiveNext();\n            currentRotation = (Quaternion)stream.ReceiveNext();\n        }\n    }\n}\n<\/code><\/pre>\n<h3 id=\"3.3%C2%A0%E6%9E%AA%E7%9A%84%E8%84%9A%E6%9C%AC\">\n   3.3\u00a0\u67aa\u7684\u811a\u672c<br \/>\n  <\/h3>\n<p>\n   \u7f16\u5199\u67aa\u7684\u811a\u672c<br \/>\n   <em><br \/>\n    <span style=\"color:#956fe7;\"><br \/>\n     <strong><br \/>\n      Gun\uff0c<br \/>\n     <\/strong><br \/>\n    <\/span><br \/>\n   <\/em><br \/>\n   \u6302\u8f7d\u5230<br \/>\n   <em><br \/>\n    <strong><br \/>\n     <span style=\"color:#956fe7;\"><br \/>\n      Assault_Rifle_02<br \/>\n     <\/span><br \/>\n    <\/strong><br \/>\n   <\/em><br \/>\n   \u4e0a\uff0c\u5e76\u6309\u4e0b\u56fe\u628a\u53c2\u6570\u586b\u5145\u597d\n  <\/p>\n<p class=\"img-center\">\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\n\/\/\u67aa\u7684\u811a\u672c\npublic class Gun : MonoBehaviour\n{\n\n    public int BulletCount = 10;\n\n    public GameObject bulletPrefab;\n    public GameObject casingPreafab;\n\n    public Transform bulletTf;\n    public Transform casingTf;\n    \n    void Start()\n    {\n        \n    }\n\n    public void Attack()\n    {\n        GameObject bulletObj = Instantiate(bulletPrefab);\n        bulletObj.transform.position = bulletTf.transform.position;\n        bulletObj.GetComponent&lt;Rigidbody&gt;().AddForce(transform.forward * 500, ForceMode.Impulse);  \/\/\u5b50\u5f39\u901f\u5ea6   \u8ba9\u4e2d\u5fc3\u70b9\u8ddf\u67aa\u53e3\u4f4d\u7f6e\u53ef\u81ea\u884c\u8c03\u6574\u6444\u50cf\u673a\u7684\u504f\u79fb\u503c\n\n        GameObject casingObj = Instantiate(casingPreafab);\n        casingObj.transform.position = casingTf.transform.position;\n    }\n}\n<\/code><\/pre>\n<h2 id=\"%E5%9B%9B%E3%80%81%E9%A1%B9%E7%9B%AE%E6%89%93%E5%8C%85%E5%AF%BC%E5%87%BA%C2%A0\">\n   \u56db\u3001\u9879\u76ee\u6253\u5305\u5bfc\u51fa<br \/>\n  <\/h2>\n<ol>\n<li>\n    \u6587\u4ef6 \u2014\u2014\u300b \u751f\u6210\u8bbe\u7f6e<\/p>\n<p class=\"img-center\">\n<\/li>\n<li>\n    \u70b9\u51fb\u751f\u6210\u9009\u62e9\u6587\u4ef6\u5939\u6253\u5305<\/p>\n<p class=\"img-center\">\n<\/li>\n<li>\n    \u6253\u5305\u597d\u540e\u4e5f\u53ef\u4ee5\u53d1\u7ed9\u81ea\u5df1\u7684\u5c0f\u4f19\u4f34\uff0c\u53cc\u51fb\u76f4\u63a5\u53ef\u4ee5\u8fd0\u884c<\/p>\n<p class=\"img-center\">\n<\/li>\n<\/ol>\n<p>\n   \u540e\u8fb9\u5c0f\u7f16\u5728\u72ec\u7acb\u5f00\u53d1\u8005C\u9171\u6559\u7a0b\u7684\u57fa\u7840\u4e0a\u8fd8\u81ea\u5df1\u52a0\u4e86\u6635\u79f0\u81ea\u5b9a\u4e49\u663e\u793a\u3001\u624b\u96f7\u3001\u706b\u7bad\u7b52\u3001\u8df3\u8dc3\u3001\u52a0\u901f\u8dd1\u3001\u8ba1\u5206\u677f\u529f\u80fd\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u4eec\u53ef\u4ee5\u53bb\u770b\u4e00\u4e0b\uff0c\u611f\u8c22\u5927\u5bb6\u7684\u652f\u6301\u00a0\uff1a\n  <\/p>\n<p>\n   <a class=\"has-card\" href=\"https:\/\/blog.csdn.net\/qq_48512649\/article\/details\/136615629\" title=\"Unity\u4e4bPUN\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f\u7684\u4f18\u5316\uff08Section 1\uff09_unity \u591a\u4eba\u6e38\u620f\u8ba1\u5206\u677f-CSDN\u535a\u5ba2\"><br \/>\n    <span class=\"link-card-box\"><br \/>\n     <span class=\"link-title\"><br \/>\n      Unity\u4e4bPUN\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f\u7684\u4f18\u5316\uff08Section 1\uff09_unity \u591a\u4eba\u6e38\u620f\u8ba1\u5206\u677f-CSDN\u535a\u5ba2<br \/>\n     <\/span><br \/>\n     <span class=\"link-desc\"><br \/>\n      \u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.7k\u6b21\uff0c\u70b9\u8d5e24\u6b21\uff0c\u6536\u85cf32\u6b21\u3002\u5173\u4e8e\u4f18\u5316\u4e86\u54ea\u51e0\u4e2a\u5c0f\u70b9\uff1a\u70b9\u51fb\u5f00\u59cb\u6e38\u620f\u73a9\u5bb6\u53ef\u4ee5\u8f93\u5165\u81ea\u5df1\u7684\u6635\u79f0\uff1b\u8fdb\u5165\u5230\u623f\u95f4\u540e\u73a9\u5bb6\u5bf9\u5e94\u7684\u6635\u79f0\u4e5f\u4f1a\u540c\u6b65\u663e\u793a\u5230\u623f\u95f4\u5217\u8868\u4e0a\uff1b\u548c\u670b\u53cb\u4e00\u8d77\u73a9\u7684\u65f6\u5019\u4ed6\u8bf4\u4f1a\u5361\u8fdb\u623f\u95f4\u7684\u6a21\u578b\u91cc\u5efa\u8bae\u6211\u52a0\u4e0a\u8df3\u8dc3\u529f\u80fd\uff0c\u6211\u5c31\u7ed9\u52a0\u4e0a\u4e86\uff0c\u987a\u4fbf\u52a0\u4e86\u4e00\u4e2a\u6309\u4f4fShift\u548c\u65b9\u5411\u952e\u8fdb\u884c\u52a0\u901f\u8dd1\uff1b\u540c\u65f6\u6309\u4f4fTab\u952e\u4f1a\u663e\u793a\u51fa\u8ba1\u5206\u677f\uff0c\u8fd9\u4e2a\u8ba1\u5206\u677f\u662f\u6309\u7167\u5c04\u51fb\u547d\u4e2d\u6b21\u6570\u6765\u8ba1\u5206\u7684\u3002_unity \u591a\u4eba\u6e38\u620f\u8ba1\u5206\u677f<br \/>\n     <\/span><br \/>\n     <span class=\"link-link\"><br \/>\n      https:\/\/blog.csdn.net\/qq_48512649\/article\/details\/136615629<br \/>\n     <\/span><br \/>\n    <\/span><br \/>\n   <\/a><br \/>\n   <a class=\"has-card\" href=\"https:\/\/blog.csdn.net\/qq_48512649\/article\/details\/137267066\" title=\"Unity\u4e4bPUN\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f\u7684\u4f18\u5316\uff08Section 2\uff09_unity photon \u591a\u4eba\u5c04\u51fb\u6e38\u620f-CSDN\u535a\u5ba2\"><br \/>\n    <span class=\"link-card-box\"><br \/>\n     <span class=\"link-title\"><br \/>\n      Unity\u4e4bPUN\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f\u7684\u4f18\u5316\uff08Section 2\uff09_unity photon \u591a\u4eba\u5c04\u51fb\u6e38\u620f-CSDN\u535a\u5ba2<br \/>\n     <\/span><br \/>\n     <span class=\"link-desc\"><br \/>\n      \u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf37\u6b21\u3002\u8fd9\u51e0\u5468\u90fd\u7ed9\u6211\u5e03\u7f6e\u4efb\u52a1\u4e86\uff0c\u6700\u8fd1\u53ef\u5fd9\u3002\u4eca\u5929\u5c31\u6765\u5151\u73b0\u8bfa\u8a00\uff1a\u6709\u5929\u6211\u67e5\u770b\u8fd9\u4e2a\u6e38\u620f\u5305\u7684\u8d44\u6e90\uff0c\u5c45\u7136\u53d1\u73b0\u4e86\u624b\u96f7\u548c\u5176\u4ed6\u5f88\u591a\u6b66\u5668\uff0c\u800c\u4e14\u624b\u96f7\u7684\u7206\u70b8\u811a\u672c\u662f\u5199\u597d\u7684\uff0c\u90a3\u5c31\u8bd5\u7740\u52a0\u4e00\u4e2a\u624b\u96f7\u529f\u80fd\u3002\u770b\u4e00\u4e0b\u6548\u679c\u624b\u96f7\u7206\u70b8\u7684\u539f\u7406\u5462\u5c31\u50cf\u5c0f\u7f16\u4e4b\u524d\u5199\u7684\u7269\u7406\u7cfb\u7edf\u91cc\u9762\u7684\u5c0f\u5b9e\u4f8b\u4e00\u6837\uff1aUnity\u4e4b\u7269\u7406\u7cfb\u7edf_unity \u7269\u7406\u7cfb\u7edf-CSDN\u535a\u5ba2\u4e13\u680f\u7684\u4e0a\u4e00\u7bc7\u89d2\u8272\u63a7\u5236\u5668\u63a7\u5236\u89d2\u8272\u79fb\u52a8\u8df3\u5d16\uff0c\u8fd9\u4e00\u7bc7\u6765\u8bf4\u8bf4Unity\u7684\u7269\u7406\u7cfb\u7edf\u3002\u672c\u7bc7\u5c0f\u7f16\u8fd8\u8981\u5e26\u5927\u5bb6\u505a\u4e00\u4e2a\u78b0\u649e\u68c0\u6d4b\u6548\u679c\u5b9e\u4f8b\uff0c\u5148\u653e\u6548\u679c\u56fe\uff1a\u6d41\u661f\u649e\u51fb\u5730\u9762\u4ea7\u751f\u7206\u70b8\u6548\u679c\u3002_unity \u7269\u7406\u7cfb\u7edf\u3002_unity photon \u591a\u4eba\u5c04\u51fb\u6e38\u620f<br \/>\n     <\/span><br \/>\n     <span class=\"link-link\"><br \/>\n      https:\/\/blog.csdn.net\/qq_48512649\/article\/details\/137267066<br \/>\n     <\/span><br \/>\n    <\/span><br \/>\n   <\/a><br \/>\n   <a class=\"has-card\" href=\"https:\/\/blog.csdn.net\/qq_48512649\/article\/details\/137673038\" title=\"Unity\u4e4bPUN\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f\u7684\u4f18\u5316\uff08Section 3\uff09_unity pun-CSDN\u535a\u5ba2\"><br \/>\n    <span class=\"link-card-box\"><br \/>\n     <span class=\"link-title\"><br \/>\n      Unity\u4e4bPUN\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f\u7684\u4f18\u5316\uff08Section 3\uff09_unity pun-CSDN\u535a\u5ba2<br \/>\n     <\/span><br \/>\n     <span class=\"link-desc\"><br \/>\n      \u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb455\u6b21\uff0c\u70b9\u8d5e4\u6b21\uff0c\u6536\u85cf3\u6b21\u3002\u624b\u96f7\u90fd\u52a0\u4e86\u5728\u52a0\u4e2a\u706b\u7bad\u7b52\u4e0d\u8fc7\u5206\u5427\u3002\u6548\u679c\u770bGIF\u6548\u679c\u56fe\uff0c\u5206\u522b\u662f\u5355\u673a\u548c\u8054\u673a\u7684\u6548\u679c\u3002_unity pun<br \/>\n     <\/span><br \/>\n     <span class=\"link-link\"><br \/>\n      https:\/\/blog.csdn.net\/qq_48512649\/article\/details\/137673038<br \/>\n     <\/span><br \/>\n    <\/span><br \/>\n   <\/a>\n  <\/p>\n<p class=\"img-center\">\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 \ud83d\udcd6 \u4e00\u3001\u51c6\u5907\u5de5\u4f5c \ud83d\udcfa \u4e8c\u3001UI\u754c\u9762\u5904\u7406 \ud83d\udcf1 2.1 \u767b\u5f55UI\u5e76\u8fde\u63a5PUN2\u670d\u52a1\u5668 \ud83d\udcf1 2.2 \u6e38\u620f\u5927\u5385\u754c [&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-382","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>Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f - \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=\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity\u4e4bpun2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u5f55 \ud83d\udcd6 \u4e00\u3001\u51c6\u5907\u5de5\u4f5c \ud83d\udcfa \u4e8c\u3001UI\u754c\u9762\u5904\u7406 \ud83d\udcf1 2.1 \u767b\u5f55UI\u5e76\u8fde\u63a5PUN2\u670d\u52a1\u5668 \ud83d\udcf1 2.2 \u6e38\u620f\u5927\u5385\u754c [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity\u4e4bpun2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f-2\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-01T10:00:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/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=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f\",\"datePublished\":\"2025-04-01T10:00:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/\"},\"wordCount\":152,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#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\":[\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/\",\"url\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/\",\"name\":\"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-04-01T10:00:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#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\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f\"}]},{\"@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":"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f - \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":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity\u4e4bpun2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f-2\/","og_locale":"zh_CN","og_type":"article","og_title":"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u76ee\u5f55 \ud83d\udcd6 \u4e00\u3001\u51c6\u5907\u5de5\u4f5c \ud83d\udcfa \u4e8c\u3001UI\u754c\u9762\u5904\u7406 \ud83d\udcf1 2.1 \u767b\u5f55UI\u5e76\u8fde\u63a5PUN2\u670d\u52a1\u5668 \ud83d\udcf1 2.2 \u6e38\u620f\u5927\u5385\u754c [&hellip;]","og_url":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity\u4e4bpun2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f-2\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-04-01T10:00:18+00:00","og_image":[{"width":260,"height":180,"url":"https:\/\/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":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#article","isPartOf":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/"},"author":{"name":"admin@wunen","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f","datePublished":"2025-04-01T10:00:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/"},"wordCount":152,"commentCount":0,"publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"image":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#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":["https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/","url":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/","name":"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"https:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#primaryimage"},"image":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-04-01T10:00:18+00:00","breadcrumb":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#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":"https:\/\/www.wunen.com\/index.php\/2025\/04\/01\/unity%e4%b9%8bpun2%e6%8f%92%e4%bb%b6%e5%ae%9e%e7%8e%b0%e5%a4%9a%e4%ba%ba%e8%81%94%e6%9c%ba%e5%b0%84%e5%87%bb%e6%b8%b8%e6%88%8f-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"Unity\u4e4bPUN2\u63d2\u4ef6\u5b9e\u73b0\u591a\u4eba\u8054\u673a\u5c04\u51fb\u6e38\u620f"}]},{"@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\/382","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=382"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/382\/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=382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=382"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}