Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赤子奈落
MDPro3
Commits
7c575eff
Commit
7c575eff
authored
Jul 27, 2025
by
SherryChaos
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ypk downloading ignore certification check
parent
1c9f195a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
Assets/Scripts/MDPro3/Net/NetUtil.cs
Assets/Scripts/MDPro3/Net/NetUtil.cs
+10
-0
Assets/Scripts/MDPro3/Servant/SettingServant.cs
Assets/Scripts/MDPro3/Servant/SettingServant.cs
+5
-2
No files found.
Assets/Scripts/MDPro3/Net/NetUtil.cs
View file @
7c575eff
using
System
;
using
System
;
using
UnityEngine.Networking
;
namespace
MDPro3.Net
namespace
MDPro3.Net
{
{
public
static
class
NetUtil
public
static
class
NetUtil
{
{
public
static
bool
IsValidUrl
(
string
inputUrl
)
public
static
bool
IsValidUrl
(
string
inputUrl
)
{
{
if
(
string
.
IsNullOrEmpty
(
inputUrl
))
if
(
string
.
IsNullOrEmpty
(
inputUrl
))
...
@@ -38,5 +40,13 @@ namespace MDPro3.Net
...
@@ -38,5 +40,13 @@ namespace MDPro3.Net
return
false
;
return
false
;
}
}
public
class
AcceptAllCertificateHandler
:
CertificateHandler
{
protected
override
bool
ValidateCertificate
(
byte
[]
certificateData
)
{
return
true
;
}
}
}
}
}
}
Assets/Scripts/MDPro3/Servant/SettingServant.cs
View file @
7c575eff
...
@@ -6,6 +6,7 @@ using System;
...
@@ -6,6 +6,7 @@ using System;
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Net
;
using
System.Reflection
;
using
System.Reflection
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
UnityEngine
;
using
UnityEngine
;
...
@@ -15,6 +16,7 @@ using UnityEngine.Networking;
...
@@ -15,6 +16,7 @@ using UnityEngine.Networking;
using
UnityEngine.Rendering.Universal
;
using
UnityEngine.Rendering.Universal
;
using
UnityEngine.UI
;
using
UnityEngine.UI
;
using
static
MDPro3
.
CardRenderer
;
using
static
MDPro3
.
CardRenderer
;
using
static
MDPro3
.
Net
.
NetUtil
;
namespace
MDPro3.Servant
namespace
MDPro3.Servant
{
{
...
@@ -236,16 +238,17 @@ namespace MDPro3.Servant
...
@@ -236,16 +238,17 @@ namespace MDPro3.Servant
StartCoroutine
(
DownloadYpkAsync
(
url
));
StartCoroutine
(
DownloadYpkAsync
(
url
));
}
}
private
IEnumerator
DownloadYpkAsync
(
string
url
)
private
IEnumerator
DownloadYpkAsync
(
string
url
)
{
{
downloadingYPK
=
true
;
downloadingYPK
=
true
;
using
var
request
=
UnityWebRequest
.
Get
(
url
);
using
var
request
=
UnityWebRequest
.
Get
(
url
);
request
.
certificateHandler
=
new
AcceptAllCertificateHandler
();
request
.
SendWebRequest
();
request
.
SendWebRequest
();
while
(!
request
.
isDone
)
while
(!
request
.
isDone
)
{
{
GetUI
<
SettingServantUI
>().
ButtonDownloadYPK
.
SetModeText
((
request
.
downloadProgress
*
100f
).
ToString
(
"0.##"
)
+
"%"
);
GetUI
<
SettingServantUI
>().
ButtonDownloadYPK
.
SetModeText
((
request
.
downloadProgress
*
100f
).
ToString
(
"0.##"
)
+
"%"
);
yield
return
n
ull
;
yield
return
n
ew
WaitForSeconds
(
0.3f
)
;
}
}
if
(
request
.
result
==
UnityWebRequest
.
Result
.
Success
)
if
(
request
.
result
==
UnityWebRequest
.
Result
.
Success
)
...
...
nanahira
@nanahira
mentioned in issue
#134
·
Jul 27, 2025
mentioned in issue
#134
mentioned in issue #134
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment