Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
MyCard
YGOProUnity_V2
Commits
d7e6bca6
Commit
d7e6bca6
authored
May 03, 2022
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add GetTexture2DFromZip
parent
2b482758
Pipeline
#12288
failed with stages
in 29 minutes and 13 seconds
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1034 additions
and
1001 deletions
+1034
-1001
Assets/SibylSystem/MonoHelpers/UIHelper.cs
Assets/SibylSystem/MonoHelpers/UIHelper.cs
+1012
-1000
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+22
-1
No files found.
Assets/SibylSystem/MonoHelpers/UIHelper.cs
View file @
d7e6bca6
This diff is collapsed.
Click to expand it.
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
d7e6bca6
using
System.Collections.Generic
;
using
Ionic.Zip
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.IO
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
UnityEngine
;
using
UnityEngine
;
...
@@ -88,6 +89,26 @@ public class GameTextureManager
...
@@ -88,6 +89,26 @@ public class GameTextureManager
{
{
if
(
code
==
0
)
return
zero
;
if
(
code
==
0
)
return
zero
;
if
(
loadedPicture
.
TryGetValue
(
code
,
out
var
cached
))
return
await
cached
;
if
(
loadedPicture
.
TryGetValue
(
code
,
out
var
cached
))
return
await
cached
;
foreach
(
ZipFile
zip
in
GameZipManager
.
Zips
)
{
if
(
zip
.
Name
.
ToLower
().
EndsWith
(
"script.zip"
))
continue
;
foreach
(
string
file
in
zip
.
EntryFileNames
)
{
foreach
(
var
extname
in
new
[]
{
".png"
,
".jpg"
})
{
var
path
=
$"pics/
{
code
}{
extname
}
"
;
if
(
file
.
ToLower
()
==
path
)
{
var
result
=
UIHelper
.
GetTexture2DFromZipAsync
(
zip
,
file
);
loadedPicture
.
Add
(
code
,
result
);
return
await
result
;
}
}
}
}
foreach
(
var
extname
in
new
[]
{
".png"
,
".jpg"
})
foreach
(
var
extname
in
new
[]
{
".png"
,
".jpg"
})
{
{
var
path
=
$"picture/card/
{
code
}{
extname
}
"
;
var
path
=
$"picture/card/
{
code
}{
extname
}
"
;
...
...
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