当前位置: 首页 > wzjs >正文

开发网站需要怎么做百度网盘下载慢

开发网站需要怎么做,百度网盘下载慢,拨号服务器做网站nat123,佛山市禅城网站建设公司1.创建空白插件 2.导入在线子系统以及在线steam子系统库 MultiplayerSessions.uplugin MultiplayerSessions.Build.cs 3.创建游戏实例以及初始化会话创建流程 创建会话需要的函数,委托,委托绑定的回调,在线子系统接口绑定某一个委托的控制其…

1.创建空白插件

2.导入在线子系统以及在线steam子系统库

`MultiplayerSessions.uplugin`

MultiplayerSessions.Build.cs

3.创建游戏实例以及初始化会话创建流程

创建会话需要的函数,委托,委托绑定的回调,在线子系统接口绑定某一个委托的控制其绑定的生命周期的句柄

// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"
#include "Subsystems/GameInstanceSubsystem.h"
#include "Interfaces/OnlineSessionInterface.h"  // 包含委托定义
#include "MultiplayerSessionsSubsystem.generated.h"/*** */
UCLASS()
class MULTIPLAYERSESSIONS_API UMultiplayerSessionsSubsystem : public UGameInstanceSubsystem
{GENERATED_BODY()public:UMultiplayerSessionsSubsystem();/* 会话有关的函数 */void CreateSession(int32 NumPublicConnections, FString MatchType);void FindSessions(int32 MaxSearchResults);void JoinSession(const FOnlineSessionSearchResult& SearchResult);void DestroySession();void StartSession();protected:/* 委托的回调函数 */void OnCreateSessionComplete(FName SessionName, bool bWasSuccessful);void OnFindSessionsComplete(bool bWasSuccessful);void OnJoinSessionComplete(FName SessionName, EOnJoinSessionCompleteResult::Type Result);void OnDestroySessionComplete(FName SessionName, bool bWasSuccessful);void OnStartSessionComplete(FName SessionName, bool bWasSuccessful);private:/* 进入服务器的凭证,通过该凭证来加入同一个服务器 */IOnlineSessionPtr OnlineSessionInterface;/* 在线子系统的委托 */FOnCreateSessionCompleteDelegate OnCreateSessionCompleteDelegate;FOnFindSessionsCompleteDelegate OnFindSessionsCompleteDelegate;FOnJoinSessionCompleteDelegate OnJoinSessionCompleteDelegate;FOnDestroySessionCompleteDelegate OnDestroySessionCompleteDelegate;FOnStartSessionCompleteDelegate OnStartSessionCompleteDelegate;/* 在线子系统委托对应的句柄 *//* 例:当创建会话时,在线子系统会绑定创建完会话的委托,该函数会返回创建会话完成委托的句柄,来管理委托的绑定生命周期*/FDelegateHandle OnCreateSessionCompleteDelegateHandle;FDelegateHandle OnFindSessionsCompleteDelegateHandle;FDelegateHandle OnJoinSessionCompleteDelegateHandle;FDelegateHandle OnDestroySessionCompleteDelegateHandle;FDelegateHandle OnStartSessionCompleteDelegateHandle;private:/* 绑定委托的回调 */void BindCallBack();
};

实现代码

4.创建系统菜单

编译报错

1>[3/4] Link [x64] UnrealEditor-MultiplayerSessions.dll (0:00.78 at +0:14)
1>  正在创建库 H:\UEProject\5.3\MultiPlayer\MenuSystem\Plugins\MultiplayerSessions\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplayerSessions\UnrealEditor-MultiplayerSessions.sup.lib 和对象 H:\UEProject\5.3\MultiPlayer\MenuSystem\Plugins\MultiplayerSessions\Intermediate\Build\Win64\x64\UnrealEditor\Development\MultiplayerSessions\UnrealEditor-MultiplayerSessions.sup.exp
1>Module.MultiplayerSessions.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl UWidget::FFieldNotificationClassDescriptor::FFieldNotificationClassDescriptor(void)" (__imp_??0FFieldNotificationClassDescriptor@UWidget@@QEAA@XZ),函数 "public: virtual struct UE::FieldNotification::IClassDescriptor const & __cdecl UWidget::GetFieldNotificationDescriptor(void)const " (?GetFieldNotificationDescriptor@UWidget@@UEBAAEBUIClassDescriptor@FieldNotification@UE@@XZ) 中引用了该符号
1>Module.MultiplayerSessions.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: virtual __cdecl UWidget::FFieldNotificationClassDescriptor::~FFieldNotificationClassDescriptor(void)" (__imp_??1FFieldNotificationClassDescriptor@UWidget@@UEAA@XZ),函数 "void __cdecl `public: virtual struct UE::FieldNotification::IClassDescriptor const & __cdecl UWidget::GetFieldNotificationDescriptor(void)const '::`2'::`dynamic atexit destructor for 'Instance''(void)" (??__FInstance@?1??GetFieldNotificationDescriptor@UWidget@@UEBAAEBUIClassDescriptor@FieldNotification@UE@@XZ@YAXXZ) 中引用了该符号
1>Module.MultiplayerSessions.cpp.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) private: static class UClass * __cdecl UUserWidget::GetPrivateStaticClass(void)" (__imp_?GetPrivateStaticClass@UUserWidget@@CAPEAVUClass@@XZ),函数 "public: static class UClass * __cdecl UUserWidget::StaticClass(void)" (?StaticClass@UUserWidget@@SAPEAVUClass@@XZ) 中引用了该符号
1>  已定义且可能匹配的符号上的提示:

无法解析的外部符号,别看报错了这么多,先看他比比的什么

首先UWidget这个不认识,其次UUserWidget这个类也不认识

比比半天,是库缺失了,链接一下就好了,直接搜索Widget,在解决方案下

没搜到,没关系,可能这个关键字就不是头文件命名,在搜索UserWidget

直接将UMG添加到build.cs下即可

其实就是VS下的筛选器的名字

生成成功

设置UI界面配置

#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Menu.generated.h"/*** */
UCLASS()
class MULTIPLAYERSESSIONS_API UMenu : public UUserWidget
{GENERATED_BODY()public:UFUNCTION(BlueprintCallable)void MenuSetup(int32 _NumberOfPublicConnections, FString _TypeOfMatch, FString _LobbyPath);public:/* 最大连接数 */UPROPERTY(BlueprintReadWrite)int32 NumberOfPublicConnections;UPROPERTY(BlueprintReadWrite)FString MatchType;/* 大厅路径 */UPROPERTY(BlueprintReadWrite)FString LobbyPath;
};
#include "Menu.h"void UMenu::MenuSetup(int32 _NumberOfPublicConnections, FString _TypeOfMatch, FString _LobbyPath)
{LobbyPath = FString::Printf(TEXT("%s?listen"), *_LobbyPath);NumberOfPublicConnections = _NumberOfPublicConnections;MatchType = _TypeOfMatch;AddToViewport();SetVisibility(ESlateVisibility::Visible);bIsFocusable = true;																// 允许接收输入事件UWorld* World = GetWorld();if (World){APlayerController* PlayerController = World->GetFirstPlayerController();if (PlayerController){FInputModeUIOnly InputMode;InputMode.SetWidgetToFocus(TakeWidget());									// 聚焦当前控件InputMode.SetLockMouseToViewportBehavior(EMouseLockMode::DoNotLock);		// 不限制鼠标PlayerController->SetInputMode(InputMode);									// 切换为纯UI输入模式PlayerController->bShowMouseCursor = true;									// 显示鼠标光标}}
}

创建控件蓝图

以创建的C++Menu类为父类创建

在关卡中显示

http://www.dtcms.com/wzjs/350461.html

相关文章:

  • 网站主机做外挂网络营销专业毕业论文
  • 唐山建设工程信息网站精准数据营销方案
  • 淘客网站怎么建设可以免费领取会员的软件
  • 什么网站做外贸最多的网络推广有哪些
  • wordpress建设的网站白帽seo公司
  • 怎么对自己做的网站进行加密自己怎么免费做网站
  • 南宁网站建设公司哪家好软文范例大全100字
  • 网站开发诺亚科技网络广告
  • 网页设计入门问题和解决办法优化排名推广教程网站
  • 网站建设的创新之处seo sem优化
  • 生鲜农产品网站建设志鸿优化网官网
  • 哪种网站开发简单游戏代理
  • 关于政府网站建设推进落实情况百度竞价排名规则及费用
  • 泰州网站建设专业团队宁波seo网络推广报价
  • 软件网站开发公司汽车网站建设
  • 注册了域名之后怎么做网站宁波seo教程行业推广
  • 自己做网站做那种类型市场策划方案
  • 修改网站照片需要怎么做百度推广客服
  • 尊园地产做的网站seo关键词排名优化app
  • 教育 高校 网站模板企业网络推广的方法有哪些
  • 高端网站制作最新的全国疫情
  • 人人开发接单官网鸡西seo顾问
  • 佛山专业网站建设哪家好域名权重
  • 会声会影免费模板网站外链图片
  • 域名备案期间 网站访问阜阳seo
  • 长沙建设教育网站培训方案及培训计划
  • 网络推广宣传seo的工作流程
  • 网站建设开票内容些什么app推广员好做吗
  • 企业网站建设运营推广下载
  • 长沙市建站苏州优化网站公司