Hi ALL
Here is my code
.h
UCLASS()
class NETWORKDEMO_API AUNWGameInstance : public AGameSession
{
GENERATED_BODY()
public:
TSharedPtr MySessionSettings;
FOnCreateSessionCompleteDelegate OnCreateSessionCompleteDelegate;
FDelegateHandle OnCreateSessionCompleteDelegateHandle;
.cpp
MySessionSettings = MakeShareable(new FOnlineSessionSettings());
OnCreateSessionCompleteDelegate = FOnCreateSessionCompleteDelegate::CreateUObject(this, &AUNWGameInstance::OnCreateSessionComplete);
When i run my program,editor will crash with the error,Access violation - code c0000005 (first/second chance not available)
It`s strange,i have declare MySessionSettings and OnCreateSessionCompleteDelegate in my header file
So,what do i miss?Does anyone have a solution for my problem?
Thank you!