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
1
Merge Requests
1
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
6cfab698
Commit
6cfab698
authored
Jan 09, 2024
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load expansions/pics
parent
8da46df5
Pipeline
#27034
passed with stages
in 55 minutes and 20 seconds
Changes
1
Pipelines
9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
+14
-2
No files found.
Assets/SibylSystem/ResourceManagers/GameTextureManager.cs
View file @
6cfab698
...
@@ -89,6 +89,7 @@ public class GameTextureManager
...
@@ -89,6 +89,7 @@ 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
;
var
SupportedExtensions
=
new
[]
{
".png"
,
".jpg"
};
foreach
(
ZipFile
zip
in
GameZipManager
.
Zips
)
foreach
(
ZipFile
zip
in
GameZipManager
.
Zips
)
{
{
...
@@ -96,7 +97,7 @@ public class GameTextureManager
...
@@ -96,7 +97,7 @@ public class GameTextureManager
continue
;
continue
;
foreach
(
string
file
in
zip
.
EntryFileNames
)
foreach
(
string
file
in
zip
.
EntryFileNames
)
{
{
foreach
(
var
extname
in
new
[]
{
".png"
,
".jpg"
}
)
foreach
(
var
extname
in
SupportedExtensions
)
{
{
var
path
=
$"pics/
{
code
}{
extname
}
"
;
var
path
=
$"pics/
{
code
}{
extname
}
"
;
if
(
file
.
ToLower
()
==
path
)
if
(
file
.
ToLower
()
==
path
)
...
@@ -109,7 +110,18 @@ public class GameTextureManager
...
@@ -109,7 +110,18 @@ public class GameTextureManager
}
}
}
}
foreach
(
var
extname
in
new
[]
{
".png"
,
".jpg"
})
foreach
(
var
extname
in
SupportedExtensions
)
{
var
path
=
$"expansions/pics/
{
code
}{
extname
}
"
;
if
(
File
.
Exists
(
path
))
{
var
result
=
UIHelper
.
GetTexture2DAsync
(
path
);
loadedPicture
.
Add
(
code
,
result
);
return
await
result
;
}
}
foreach
(
var
extname
in
SupportedExtensions
)
{
{
var
path
=
$"picture/card/
{
code
}{
extname
}
"
;
var
path
=
$"picture/card/
{
code
}{
extname
}
"
;
if
(
File
.
Exists
(
path
))
if
(
File
.
Exists
(
path
))
...
...
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