{"id":18773,"date":"2025-04-19T01:09:49","date_gmt":"2025-04-18T17:09:49","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/18773.html"},"modified":"2025-04-19T01:09:49","modified_gmt":"2025-04-18T17:09:49","slug":"%e3%80%90ue-%e7%bd%91%e7%bb%9c%e3%80%91%e4%b8%93%e7%94%a8%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e5%a4%9a%e4%b8%aa%e5%ae%a2%e6%88%b7%e7%ab%af%e5%8a%a0%e5%85%a5%e6%b8%b8%e6%88%8f%e4%bc%9a%e8%af%9d","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/18773.html","title":{"rendered":"\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b"},"content":{"rendered":"<\/p>\n<h4>\u76ee\u5f55<\/h4>\n<ul>\n<li>0 \u5f15\u8a00<\/li>\n<li>1 \u591a\u4eba\u6e38\u620f\u4f1a\u8bdd<\/li>\n<li>\n<ul>\n<li>1.1 Why&#xff1f;\u4e3a\u4ec0\u4e48\u8981\u6709\u8fd9\u4e2a<\/li>\n<li>1.2 How&#xff1f;\u600e\u4e48\u4f7f\u7528&#xff1f;<\/li>\n<\/ul>\n<\/li>\n<li>2 \u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u6d41\u7a0b<\/li>\n<li>\n<ul>\n<li>\n<ul>\n<li>\u603b\u7ed3<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170948-6802875c7925c.gif\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" width=\"360\" \/><\/p>\n<ul>\n<li>&#x1f64b;\u200d\u2642\ufe0f \u4f5c\u8005&#xff1a;\u6d77\u7801007<\/li>\n<li>&#x1f4dc; \u4e13\u680f&#xff1a;UE\u865a\u5e7b\u5f15\u64ce\u4e13\u680f<\/li>\n<li>&#x1f4a5; \u6807\u9898&#xff1a;\u3010UE \u7f51\u7edc\u3011\u5728\u7f51\u7edc\u591a\u4eba\u6e38\u620f\u4e2d&#xff0c;\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b<\/li>\n<li>\u2763\ufe0f \u5bc4\u8bed&#xff1a;\u4e66\u5230\u7528\u65f6\u65b9\u6068\u5c11&#xff0c;\u4e8b\u975e\u7ecf\u8fc7\u4e0d\u77e5\u96be&#xff01;<\/li>\n<li>&#x1f388; \u6700\u540e&#xff1a;\u6587\u7ae0\u4f5c\u8005\u6280\u672f\u548c\u6c34\u5e73\u6709\u9650&#xff0c;\u5982\u679c\u6587\u4e2d\u51fa\u73b0\u9519\u8bef&#xff0c;\u5e0c\u671b\u5927\u5bb6\u80fd\u6307\u6b63&#xff0c;\u540c\u65f6\u6709\u95ee\u9898\u7684\u8bdd&#xff0c;\u6b22\u8fce\u5927\u5bb6\u7559\u8a00\u8ba8\u8bba\u3002<\/li>\n<\/ul>\n<h2>0 \u5f15\u8a00<\/h2>\n<p>\u7406\u89e3\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u662f\u5982\u679c\u52a0\u8f7d\u5230\u4e00\u4e2a\u6e38\u620f\u4f1a\u8bdd&#xff0c;\u6709\u52a9\u4e8e\u7f51\u7edc\u5f00\u53d1\u3002<\/p>\n<p>\u53c2\u8003\u89c6\u9891&#xff1a;\u7eff\u6d32\u6559\u7a0b<\/p>\n<h2>1 \u591a\u4eba\u6e38\u620f\u4f1a\u8bdd<\/h2>\n<h3>1.1 Why&#xff1f;\u4e3a\u4ec0\u4e48\u8981\u6709\u8fd9\u4e2a<\/h3>\n<p>\u6e38\u620f\u4f1a\u8bdd&#xff08;Session&#xff09;\u7684\u6982\u5ff5\u5728\u591a\u4eba\u6e38\u620f\u4e2d\u8d77\u5230\u4e86\u81f3\u5173\u91cd\u8981\u7684\u4f5c\u7528\u3002\u5b83\u4e0d\u4ec5\u5e2e\u52a9\u73a9\u5bb6\u627e\u5230\u5e76\u52a0\u5165\u6e38\u620f&#xff0c;\u8fd8\u786e\u4fdd\u4e86\u6e38\u620f\u7684\u72b6\u6001\u540c\u6b65\u3001\u8d44\u6e90\u7ba1\u7406\u3001\u5b89\u5168\u6027\u548c\u7a33\u5b9a\u6027\u7b49\u3002\u901a\u8fc7\u4f1a\u8bdd\u7ba1\u7406\u7cfb\u7edf&#xff0c;\u5f00\u53d1\u8005\u53ef\u4ee5\u66f4\u5bb9\u6613\u5730\u5b9e\u73b0\u590d\u6742\u7684\u591a\u4eba\u6e38\u620f\u529f\u80fd&#xff0c;\u63d0\u4f9b\u66f4\u597d\u7684\u6e38\u620f\u4f53\u9a8c\u3002<\/p>\n<h3>1.2 How&#xff1f;\u600e\u4e48\u4f7f\u7528&#xff1f;<\/h3>\n<p>\u5728\u5f00\u53d1\u591a\u4eba\u7f51\u7edc\u6e38\u620f\u65f6&#xff0c;\u4f7f\u7528\u6e38\u620f\u4f1a\u8bdd&#xff08;Session&#xff09;\u662f\u975e\u5e38\u5e38\u89c1\u4e14\u5fc5\u8981\u7684\u3002\u6e38\u620f\u4f1a\u8bdd\u5e2e\u52a9\u7ba1\u7406\u73a9\u5bb6\u7684\u8fde\u63a5\u3001\u5339\u914d\u3001\u6e38\u620f\u72b6\u6001\u540c\u6b65\u7b49\u591a\u4e2a\u65b9\u9762&#xff0c;\u4f7f\u5f97\u591a\u4eba\u6e38\u620f\u7684\u5f00\u53d1\u548c\u8fd0\u884c\u66f4\u52a0\u987a\u7545\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u6e38\u620f\u4f1a\u8bdd\u7684\u8be6\u7ec6\u6b65\u9aa4\u548c\u793a\u4f8b\u3002<\/p>\n<li>\u9009\u62e9\u5408\u9002\u7684\u5728\u7ebf\u5b50\u7cfb\u7edf&#xff08;Online Subsystem&#xff09;<\/li>\n<p>Unreal Engine&#xff08;UE&#xff09;\u63d0\u4f9b\u4e86\u591a\u79cd\u5728\u7ebf\u5b50\u7cfb\u7edf&#xff08;\u5982Steam\u3001Epic Online Services\u3001Xbox Live\u7b49&#xff09;&#xff0c;\u4f60\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u9002\u5408\u4f60\u7684\u6e38\u620f\u9700\u6c42\u7684\u5b50\u7cfb\u7edf\u3002\u901a\u5e38\u5728\u9879\u76ee\u8bbe\u7f6e\u4e2d\u914d\u7f6e&#xff1a;<\/p>\n<p><span class=\"token comment\">\/\/ \u5728DefaultEngine.ini\u4e2d\u914d\u7f6e<\/span><br \/>\n<span class=\"token punctuation\">[<\/span>OnlineSubsystem<span class=\"token punctuation\">]<\/span><br \/>\nDefaultPlatformService<span class=\"token operator\">&#061;<\/span>Null  <span class=\"token comment\">\/\/ \u6216\u8005\u662fSteam, EOS\u7b49<\/span><\/p>\n<li>\u521b\u5efa\u6e38\u620f\u4f1a\u8bdd<\/li>\n<p>\u521b\u5efa\u4f1a\u8bdd\u662f\u7531\u670d\u52a1\u5668\u6216\u4e3b\u673a\u53d1\u8d77\u7684&#xff0c;\u901a\u5e38\u5305\u62ec\u8bbe\u7f6e\u4f1a\u8bdd\u53c2\u6570&#xff08;\u5982\u6700\u5927\u73a9\u5bb6\u6570\u91cf\u3001\u6e38\u620f\u6a21\u5f0f\u3001\u5730\u56fe\u7b49&#xff09;\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">AMyGameInstance<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">CreateGameSession<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    IOnlineSubsystem<span class=\"token operator\">*<\/span> OnlineSubsystem <span class=\"token operator\">&#061;<\/span> <span class=\"token class-name\">IOnlineSubsystem<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>OnlineSubsystem<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        IOnlineSessionPtr Sessions <span class=\"token operator\">&#061;<\/span> OnlineSubsystem<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">GetSessionInterface<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>Sessions<span class=\"token punctuation\">.<\/span><span class=\"token function\">IsValid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            FOnlineSessionSettings SessionSettings<span class=\"token punctuation\">;<\/span><br \/>\n            SessionSettings<span class=\"token punctuation\">.<\/span>bIsLANMatch <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            SessionSettings<span class=\"token punctuation\">.<\/span>NumPublicConnections <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">4<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            SessionSettings<span class=\"token punctuation\">.<\/span>bShouldAdvertise <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            SessionSettings<span class=\"token punctuation\">.<\/span>bUsesPresence <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>            Sessions<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">CreateSession<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> NAME_GameSession<span class=\"token punctuation\">,<\/span> SessionSettings<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<li>\u67e5\u627e\u6e38\u620f\u4f1a\u8bdd<\/li>\n<p>\u5ba2\u6237\u7aef\u9700\u8981\u67e5\u627e\u53ef\u7528\u7684\u4f1a\u8bdd\u4ee5\u4fbf\u52a0\u5165\u6e38\u620f\u3002\u4ee5\u4e0b\u662f\u67e5\u627e\u4f1a\u8bdd\u7684\u793a\u4f8b&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">AMyGameInstance<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">FindGameSessions<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    IOnlineSubsystem<span class=\"token operator\">*<\/span> OnlineSubsystem <span class=\"token operator\">&#061;<\/span> <span class=\"token class-name\">IOnlineSubsystem<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>OnlineSubsystem<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        IOnlineSessionPtr Sessions <span class=\"token operator\">&#061;<\/span> OnlineSubsystem<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">GetSessionInterface<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>Sessions<span class=\"token punctuation\">.<\/span><span class=\"token function\">IsValid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            TSharedRef<span class=\"token operator\">&lt;<\/span>FOnlineSessionSearch<span class=\"token operator\">&gt;<\/span> SessionSearch <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">MakeShareable<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">new<\/span> <span class=\"token function\">FOnlineSessionSearch<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            SessionSearch<span class=\"token operator\">-&gt;<\/span>bIsLanQuery <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            SessionSearch<span class=\"token operator\">-&gt;<\/span>MaxSearchResults <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">10<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            SessionSearch<span class=\"token operator\">-&gt;<\/span>PingBucketSize <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">50<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>            Sessions<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">FindSessions<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> SessionSearch<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<li>\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd<\/li>\n<p>\u5ba2\u6237\u7aef\u9009\u62e9\u4e00\u4e2a\u4f1a\u8bdd\u5e76\u53d1\u9001\u52a0\u5165\u8bf7\u6c42\u3002\u4ee5\u4e0b\u662f\u52a0\u5165\u4f1a\u8bdd\u7684\u793a\u4f8b&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">AMyGameInstance<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">JoinGameSession<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    IOnlineSubsystem<span class=\"token operator\">*<\/span> OnlineSubsystem <span class=\"token operator\">&#061;<\/span> <span class=\"token class-name\">IOnlineSubsystem<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>OnlineSubsystem<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        IOnlineSessionPtr Sessions <span class=\"token operator\">&#061;<\/span> OnlineSubsystem<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">GetSessionInterface<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>Sessions<span class=\"token punctuation\">.<\/span><span class=\"token function\">IsValid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            FOnlineSessionSearchResult SearchResult<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token comment\">\/\/ \u5047\u8bbe\u5df2\u7ecf\u627e\u5230\u4e00\u4e2a\u6709\u6548\u7684\u4f1a\u8bdd<\/span><br \/>\n            Sessions<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">JoinSession<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> NAME_GameSession<span class=\"token punctuation\">,<\/span> SearchResult<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<li>\u9500\u6bc1\u6e38\u620f\u4f1a\u8bdd<\/li>\n<p>\u5f53\u6e38\u620f\u7ed3\u675f\u6216\u9700\u8981\u5173\u95ed\u4f1a\u8bdd\u65f6&#xff0c;\u670d\u52a1\u5668\u6216\u4e3b\u673a\u53ef\u4ee5\u9500\u6bc1\u4f1a\u8bdd\u3002\u4ee5\u4e0b\u662f\u9500\u6bc1\u4f1a\u8bdd\u7684\u793a\u4f8b&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">AMyGameInstance<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">DestroyGameSession<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    IOnlineSubsystem<span class=\"token operator\">*<\/span> OnlineSubsystem <span class=\"token operator\">&#061;<\/span> <span class=\"token class-name\">IOnlineSubsystem<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">Get<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>OnlineSubsystem<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        IOnlineSessionPtr Sessions <span class=\"token operator\">&#061;<\/span> OnlineSubsystem<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">GetSessionInterface<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>Sessions<span class=\"token punctuation\">.<\/span><span class=\"token function\">IsValid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            Sessions<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">DestroySession<\/span><span class=\"token punctuation\">(<\/span>NAME_GameSession<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<li>\u5904\u7406\u4f1a\u8bdd\u4e8b\u4ef6<\/li>\n<p>\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d&#xff0c;\u4f60\u8fd8\u9700\u8981\u5904\u7406\u5404\u79cd\u4f1a\u8bdd\u4e8b\u4ef6&#xff08;\u5982\u4f1a\u8bdd\u521b\u5efa\u6210\u529f\u3001\u67e5\u627e\u4f1a\u8bdd\u5b8c\u6210\u3001\u52a0\u5165\u4f1a\u8bdd\u6210\u529f\u7b49&#xff09;\u3002\u8fd9\u4e9b\u4e8b\u4ef6\u901a\u5e38\u901a\u8fc7\u59d4\u6258&#xff08;Delegate&#xff09;\u6765\u5904\u7406&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">AMyGameInstance<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">OnCreateSessionComplete<\/span><span class=\"token punctuation\">(<\/span>FName SessionName<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">bool<\/span> bWasSuccessful<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u5904\u7406\u4f1a\u8bdd\u521b\u5efa\u5b8c\u6210\u7684\u903b\u8f91<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">AMyGameInstance<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">OnFindSessionsComplete<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">bool<\/span> bWasSuccessful<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u5904\u7406\u67e5\u627e\u4f1a\u8bdd\u5b8c\u6210\u7684\u903b\u8f91<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">AMyGameInstance<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">OnJoinSessionComplete<\/span><span class=\"token punctuation\">(<\/span>FName SessionName<span class=\"token punctuation\">,<\/span> EOnJoinSessionCompleteResult<span class=\"token double-colon punctuation\">::<\/span>Type Result<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u5904\u7406\u52a0\u5165\u4f1a\u8bdd\u5b8c\u6210\u7684\u903b\u8f91<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<li>\u914d\u7f6e\u548c\u8c03\u8bd5<\/li>\n<p>\u786e\u4fdd\u5728\u9879\u76ee\u8bbe\u7f6e\u4e2d\u6b63\u786e\u914d\u7f6e\u4e86\u5728\u7ebf\u5b50\u7cfb\u7edf&#xff0c;\u5e76\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\u548c\u8c03\u8bd5\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528UE\u7684\u65e5\u5fd7\u7cfb\u7edf\u6765\u8bb0\u5f55\u548c\u8c03\u8bd5\u4f1a\u8bdd\u7ba1\u7406\u7684\u5404\u4e2a\u6b65\u9aa4\u3002<\/p>\n<p>\u603b\u7ed3&#xff1a;\u5728\u5f00\u53d1\u591a\u4eba\u7f51\u7edc\u6e38\u620f\u65f6&#xff0c;\u4f7f\u7528\u6e38\u620f\u4f1a\u8bdd\u662f\u7ba1\u7406\u73a9\u5bb6\u8fde\u63a5\u3001\u5339\u914d\u3001\u6e38\u620f\u72b6\u6001\u540c\u6b65\u7b49\u7684\u91cd\u8981\u624b\u6bb5\u3002\u901a\u8fc7\u9009\u62e9\u5408\u9002\u7684\u5728\u7ebf\u5b50\u7cfb\u7edf&#xff0c;\u521b\u5efa\u3001\u67e5\u627e\u3001\u52a0\u5165\u548c\u9500\u6bc1\u4f1a\u8bdd&#xff0c;\u5e76\u5904\u7406\u76f8\u5173\u4e8b\u4ef6&#xff0c;\u4f60\u53ef\u4ee5\u5b9e\u73b0\u4e00\u4e2a\u529f\u80fd\u5b8c\u5584\u7684\u591a\u4eba\u6e38\u620f\u7cfb\u7edf\u3002<\/p>\n<h2>2 \u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u6d41\u7a0b<\/h2>\n<p>\u5728\u4e13\u7528\u670d\u52a1\u5668\u6a21\u5f0f\u4e0b&#xff0c;\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u7684\u542f\u52a8\u548c\u8fde\u63a5\u8fc7\u7a0b&#xff0c;\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u7f51\u7edc\u540c\u6b65\u521b\u5efa&#xff0c;\u662f\u591a\u4eba\u6e38\u620f\u5f00\u53d1\u4e2d\u7684\u5173\u952e\u90e8\u5206\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u6b65\u9aa4\u548c\u6d41\u7a0b&#xff1a;<\/p>\n<li>\u542f\u52a8\u4e13\u7528\u670d\u52a1\u5668<\/li>\n<p>\u4e13\u7528\u670d\u52a1\u5668\u901a\u5e38\u5728\u547d\u4ee4\u884c\u6216\u811a\u672c\u4e2d\u542f\u52a8\u3002\u4ee5\u4e0b\u662f\u542f\u52a8\u4e13\u7528\u670d\u52a1\u5668\u7684\u547d\u4ee4\u793a\u4f8b&#xff1a;<\/p>\n<p>UE4Editor.exe YourProjectName <span class=\"token parameter variable\">-server<\/span> <span class=\"token parameter variable\">-log<\/span><\/p>\n<p>\u6216\u8005\u901a\u8fc7\u6253\u5305\u540e\u7684\u53ef\u6267\u884c\u6587\u4ef6\u542f\u52a8&#xff1a;<\/p>\n<p>YourProjectNameServer.exe YourMapName?listen <span class=\"token parameter variable\">-log<\/span><\/p>\n<li>\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd<\/li>\n<p>\u5ba2\u6237\u7aef\u9700\u8981\u8fde\u63a5\u5230\u4e13\u7528\u670d\u52a1\u5668\u3002\u4f60\u53ef\u4ee5\u5728\u6e38\u620f\u903b\u8f91\u4e2d\u5b9e\u73b0\u8fde\u63a5\u529f\u80fd&#xff0c;\u4f8b\u5982\u5728\u4e3b\u83dc\u5355\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u6309\u94ae\u6765\u8fde\u63a5\u5230\u670d\u52a1\u5668&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">UMyMainMenuWidget<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">OnJoinServerButtonClicked<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    UMyGameInstance<span class=\"token operator\">*<\/span> GameInstance <span class=\"token operator\">&#061;<\/span> <span class=\"token generic-function\"><span class=\"token function\">Cast<\/span><span class=\"token generic class-name\"><span class=\"token operator\">&lt;<\/span>UMyGameInstance<span class=\"token operator\">&gt;<\/span><\/span><\/span><span class=\"token punctuation\">(<\/span><span class=\"token function\">GetGameInstance<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>GameInstance<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        GameInstance<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">FindGameSessions<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u5728\u627e\u5230\u4f1a\u8bdd\u540e&#xff0c;\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230\u670d\u52a1\u5668&#xff1a;<\/p>\n<p><span class=\"token keyword\">void<\/span> <span class=\"token class-name\">UMyGameInstance<\/span><span class=\"token double-colon punctuation\">::<\/span><span class=\"token function\">JoinGameSession<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>SessionInterface<span class=\"token punctuation\">.<\/span><span class=\"token function\">IsValid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&amp;&amp;<\/span> SessionSearch<span class=\"token punctuation\">.<\/span><span class=\"token function\">IsValid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> FOnlineSessionSearchResult<span class=\"token operator\">&amp;<\/span> SearchResult <span class=\"token operator\">:<\/span> SessionSearch<span class=\"token operator\">-&gt;<\/span>SearchResults<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>SearchResult<span class=\"token punctuation\">.<\/span><span class=\"token function\">IsValid<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token punctuation\">{<\/span><br \/>\n                SessionInterface<span class=\"token operator\">-&gt;<\/span><span class=\"token function\">JoinSession<\/span><span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> NAME_GameSession<span class=\"token punctuation\">,<\/span> SearchResult<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n                <span class=\"token keyword\">break<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<li>GameMode\u3001PlayerController\u3001Pawn\u7684\u7f51\u7edc\u540c\u6b65\u521b\u5efa<\/li>\n<p>\u5728\u4e13\u7528\u670d\u52a1\u5668\u6a21\u5f0f\u4e0b&#xff0c;GameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u548c\u540c\u6b65\u662f\u901a\u8fc7UE\u7684\u7f51\u7edc\u6846\u67b6\u81ea\u52a8\u5904\u7406\u7684\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u6d41\u7a0b&#xff1a; GameMode<\/p>\n<li>\u670d\u52a1\u5668\u7aef\u521b\u5efa&#xff1a;\u5f53\u670d\u52a1\u5668\u542f\u52a8\u5e76\u52a0\u8f7d\u5730\u56fe\u65f6&#xff0c;GameMode\u5728\u670d\u52a1\u5668\u7aef\u521b\u5efa\u3002GameMode\u53ea\u5b58\u5728\u4e8e\u670d\u52a1\u5668\u7aef&#xff0c;\u4e0d\u4f1a\u5728\u5ba2\u6237\u7aef\u521b\u5efa\u3002<\/li>\n<li>\u7ba1\u7406\u6e38\u620f\u89c4\u5219&#xff1a;GameMode\u8d1f\u8d23\u7ba1\u7406\u6e38\u620f\u89c4\u5219\u3001\u73a9\u5bb6\u8fde\u63a5\u3001\u5173\u5361\u5207\u6362\u7b49\u3002<\/li>\n<p>PlayerController<\/p>\n<li>\u5ba2\u6237\u7aef\u8bf7\u6c42\u8fde\u63a5&#xff1a;\u5f53\u5ba2\u6237\u7aef\u8bf7\u6c42\u8fde\u63a5\u5230\u670d\u52a1\u5668\u65f6&#xff0c;\u670d\u52a1\u5668\u4f1a\u4e3a\u6bcf\u4e2a\u8fde\u63a5\u7684\u5ba2\u6237\u7aef\u521b\u5efa\u4e00\u4e2aPlayerController\u3002<\/li>\n<li>\u670d\u52a1\u5668\u7aef\u521b\u5efa&#xff1a;\u670d\u52a1\u5668\u5728\u63a5\u6536\u5230\u5ba2\u6237\u7aef\u7684\u8fde\u63a5\u8bf7\u6c42\u540e&#xff0c;\u8c03\u7528APlayerController::ClientTravel\u6765\u901a\u77e5\u5ba2\u6237\u7aef\u8fdb\u884c\u5730\u56fe\u52a0\u8f7d\u548cPlayerController\u7684\u521b\u5efa\u3002<\/li>\n<li>\u5ba2\u6237\u7aef\u540c\u6b65&#xff1a;\u5ba2\u6237\u7aef\u5728\u63a5\u6536\u5230\u670d\u52a1\u5668\u7684\u901a\u77e5\u540e&#xff0c;\u540c\u6b65\u521b\u5efaPlayerController\u3002<\/li>\n<p>Pawn<\/p>\n<li>\u670d\u52a1\u5668\u7aef\u521b\u5efa&#xff1a;\u5f53PlayerController\u5728\u670d\u52a1\u5668\u7aef\u521b\u5efa\u540e&#xff0c;\u670d\u52a1\u5668\u4f1a\u6839\u636eGameMode\u7684\u8bbe\u7f6e\u4e3a\u6bcf\u4e2aPlayerController\u751f\u6210\u4e00\u4e2aPawn\u3002<\/li>\n<li>\u5ba2\u6237\u7aef\u540c\u6b65&#xff1a;\u670d\u52a1\u5668\u751f\u6210\u7684Pawn\u4f1a\u901a\u8fc7\u7f51\u7edc\u540c\u6b65\u5230\u5ba2\u6237\u7aef\u3002\u5ba2\u6237\u7aef\u4f1a\u521b\u5efa\u4e00\u4e2a\u4e0e\u670d\u52a1\u5668\u7aefPawn\u5bf9\u5e94\u7684\u4ee3\u7406&#xff08;Replicated Proxy&#xff09;\u3002<\/li>\n<li>\u63a7\u5236\u6743&#xff1a;PlayerController\u5728\u5ba2\u6237\u7aef\u63a7\u5236Pawn\u7684\u79fb\u52a8\u548c\u64cd\u4f5c&#xff0c;\u670d\u52a1\u5668\u4f1a\u540c\u6b65\u8fd9\u4e9b\u64cd\u4f5c\u7ed9\u5176\u4ed6\u5ba2\u6237\u7aef\u3002<\/li>\n<h4>\u603b\u7ed3<\/h4>\n<p>\u5728\u4e13\u7528\u670d\u52a1\u5668\u6a21\u5f0f\u4e0b&#xff0c;\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u7684\u542f\u52a8\u548c\u8fde\u63a5\u8fc7\u7a0b&#xff0c;\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u7f51\u7edc\u540c\u6b65\u521b\u5efa&#xff0c;\u662f\u901a\u8fc7UE4\u7684\u7f51\u7edc\u6846\u67b6\u81ea\u52a8\u5904\u7406\u7684\u3002\u670d\u52a1\u5668\u8d1f\u8d23\u521b\u5efa\u548c\u7ba1\u7406GameMode\u3001PlayerController\u548cPawn&#xff0c;\u5e76\u901a\u8fc7\u5c5e\u6027\u590d\u5236\u548cRPC\u673a\u5236\u5c06\u8fd9\u4e9b\u5bf9\u8c61\u7684\u72b6\u6001\u548c\u64cd\u4f5c\u540c\u6b65\u5230\u5ba2\u6237\u7aef\u3002\u5ba2\u6237\u7aef\u5219\u6839\u636e\u670d\u52a1\u5668\u7684\u6307\u4ee4\u540c\u6b65\u521b\u5efa\u548c\u66f4\u65b0\u8fd9\u4e9b\u5bf9\u8c61&#xff0c;\u4ece\u800c\u5b9e\u73b0\u4e00\u81f4\u7684\u6e38\u620f\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.7k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf33\u6b21\u3002\u5728\u4e13\u7528\u670d\u52a1\u5668\u6a21\u5f0f\u4e0b\uff0c\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u7684\u542f\u52a8\u548c\u8fde\u63a5\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u7f51\u7edc\u540c\u6b65\u521b\u5efa\uff0c\u662f\u901a\u8fc7UE4\u7684\u7f51\u7edc\u6846\u67b6\u81ea\u52a8\u5904\u7406\u7684\u3002\u670d\u52a1\u5668\u8d1f\u8d23\u521b\u5efa\u548c\u7ba1\u7406GameMode\u3001PlayerController\u548cPawn\uff0c\u5e76\u901a\u8fc7\u5c5e\u6027\u590d\u5236\u548cRPC\u673a\u5236\u5c06\u8fd9\u4e9b\u5bf9\u8c61\u7684\u72b6\u6001\u548c\u64cd\u4f5c\u540c\u6b65\u5230\u5ba2\u6237\u7aef\u3002\u5ba2\u6237\u7aef\u5219\u6839\u636e\u670d\u52a1\u5668\u7684\u6307\u4ee4\u540c\u6b65\u521b\u5efa\u548c\u66f4\u65b0\u8fd9\u4e9b\u5bf9\u8c61\uff0c\u4ece\u800c\u5b9e\u73b0\u4e00\u81f4\u7684\u6e38\u620f\u4f53\u9a8c\u3002_\u7b2c\u4e09\u65b9\u670d\u52a1\u5668\u600e\u4e48\u91cd\u65b0\u6784\u5efagamemode\u7684\u95ee\u9898<\/p>\n","protected":false},"author":2,"featured_media":18772,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1428,43,248,78],"topic":[],"class_list":["post-18773","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ue","tag-43","tag-248","tag-78"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/18773.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.7k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf33\u6b21\u3002\u5728\u4e13\u7528\u670d\u52a1\u5668\u6a21\u5f0f\u4e0b\uff0c\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u7684\u542f\u52a8\u548c\u8fde\u63a5\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u7f51\u7edc\u540c\u6b65\u521b\u5efa\uff0c\u662f\u901a\u8fc7UE4\u7684\u7f51\u7edc\u6846\u67b6\u81ea\u52a8\u5904\u7406\u7684\u3002\u670d\u52a1\u5668\u8d1f\u8d23\u521b\u5efa\u548c\u7ba1\u7406GameMode\u3001PlayerController\u548cPawn\uff0c\u5e76\u901a\u8fc7\u5c5e\u6027\u590d\u5236\u548cRPC\u673a\u5236\u5c06\u8fd9\u4e9b\u5bf9\u8c61\u7684\u72b6\u6001\u548c\u64cd\u4f5c\u540c\u6b65\u5230\u5ba2\u6237\u7aef\u3002\u5ba2\u6237\u7aef\u5219\u6839\u636e\u670d\u52a1\u5668\u7684\u6307\u4ee4\u540c\u6b65\u521b\u5efa\u548c\u66f4\u65b0\u8fd9\u4e9b\u5bf9\u8c61\uff0c\u4ece\u800c\u5b9e\u73b0\u4e00\u81f4\u7684\u6e38\u620f\u4f53\u9a8c\u3002_\u7b2c\u4e09\u65b9\u670d\u52a1\u5668\u600e\u4e48\u91cd\u65b0\u6784\u5efagamemode\u7684\u95ee\u9898\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/18773.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T17:09:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170948-6802875c7925c.gif\" \/>\n<meta name=\"author\" content=\"admin\" \/>\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\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/18773.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/18773.html\",\"name\":\"\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T17:09:49+00:00\",\"dateModified\":\"2025-04-18T17:09:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/18773.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/18773.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/18773.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/18773.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.7k\u6b21\uff0c\u70b9\u8d5e30\u6b21\uff0c\u6536\u85cf33\u6b21\u3002\u5728\u4e13\u7528\u670d\u52a1\u5668\u6a21\u5f0f\u4e0b\uff0c\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u7684\u542f\u52a8\u548c\u8fde\u63a5\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u7f51\u7edc\u540c\u6b65\u521b\u5efa\uff0c\u662f\u901a\u8fc7UE4\u7684\u7f51\u7edc\u6846\u67b6\u81ea\u52a8\u5904\u7406\u7684\u3002\u670d\u52a1\u5668\u8d1f\u8d23\u521b\u5efa\u548c\u7ba1\u7406GameMode\u3001PlayerController\u548cPawn\uff0c\u5e76\u901a\u8fc7\u5c5e\u6027\u590d\u5236\u548cRPC\u673a\u5236\u5c06\u8fd9\u4e9b\u5bf9\u8c61\u7684\u72b6\u6001\u548c\u64cd\u4f5c\u540c\u6b65\u5230\u5ba2\u6237\u7aef\u3002\u5ba2\u6237\u7aef\u5219\u6839\u636e\u670d\u52a1\u5668\u7684\u6307\u4ee4\u540c\u6b65\u521b\u5efa\u548c\u66f4\u65b0\u8fd9\u4e9b\u5bf9\u8c61\uff0c\u4ece\u800c\u5b9e\u73b0\u4e00\u81f4\u7684\u6e38\u620f\u4f53\u9a8c\u3002_\u7b2c\u4e09\u65b9\u670d\u52a1\u5668\u600e\u4e48\u91cd\u65b0\u6784\u5efagamemode\u7684\u95ee\u9898","og_url":"https:\/\/www.wsisp.com\/helps\/18773.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T17:09:49+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418170948-6802875c7925c.gif"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/18773.html","url":"https:\/\/www.wsisp.com\/helps\/18773.html","name":"\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T17:09:49+00:00","dateModified":"2025-04-18T17:09:49+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/18773.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/18773.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/18773.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010UE \u7f51\u7edc\u3011\u4e13\u7528\u670d\u52a1\u5668\u548c\u591a\u4e2a\u5ba2\u6237\u7aef\u52a0\u5165\u6e38\u620f\u4f1a\u8bdd\u7684\u8fc7\u7a0b\uff0c\u4ee5\u53caGameMode\u3001PlayerController\u3001Pawn\u7684\u521b\u5efa\u6d41\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/18773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=18773"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/18773\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/18772"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=18773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=18773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=18773"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=18773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}