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
0
Issues
0
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
Hussain Hayder
MDPro3
Commits
6a82457d
Commit
6a82457d
authored
Nov 25, 2025
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove debug
parent
ad88a144
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
26 deletions
+32
-26
Assets/Scripts/MDPro3/Servant/OcgCore.cs
Assets/Scripts/MDPro3/Servant/OcgCore.cs
+0
-3
Assets/Scripts/MDPro3/UI/ServantUI/OcgCoreUI.cs
Assets/Scripts/MDPro3/UI/ServantUI/OcgCoreUI.cs
+0
-1
Assets/Scripts/MDPro3/Utility/CardImageLoader.cs
Assets/Scripts/MDPro3/Utility/CardImageLoader.cs
+25
-15
Assets/Tools/BetterStreamingAssets/BSA_BetterStreamingAssets.cs
.../Tools/BetterStreamingAssets/BSA_BetterStreamingAssets.cs
+7
-7
No files found.
Assets/Scripts/MDPro3/Servant/OcgCore.cs
View file @
6a82457d
...
@@ -238,7 +238,6 @@ namespace MDPro3.Servant
...
@@ -238,7 +238,6 @@ namespace MDPro3.Servant
{
{
Debug
.
Log
(
$"ReturnTo:
{
returnServant
}
"
);
Debug
.
Log
(
$"ReturnTo:
{
returnServant
}
"
);
Program
.
instance
.
ShiftToServant
(
returnServant
);
Program
.
instance
.
ShiftToServant
(
returnServant
);
}
}
else
else
{
{
...
@@ -589,8 +588,6 @@ namespace MDPro3.Servant
...
@@ -589,8 +588,6 @@ namespace MDPro3.Servant
{
{
if
(
manual
)
if
(
manual
)
{
{
Debug
.
Log
(
"mark7"
);
surrendered
=
false
;
surrendered
=
false
;
RoomServant
.
NeedSide
=
false
;
RoomServant
.
NeedSide
=
false
;
RoomServant
.
SideWaitingObserver
=
false
;
RoomServant
.
SideWaitingObserver
=
false
;
...
...
Assets/Scripts/MDPro3/UI/ServantUI/OcgCoreUI.cs
View file @
6a82457d
...
@@ -364,7 +364,6 @@ namespace MDPro3.UI.ServantUI
...
@@ -364,7 +364,6 @@ namespace MDPro3.UI.ServantUI
ShowPopupInput
(
selections
,
OnSaveReplay
,
OnGiveUpReplay
,
InputValidation
.
ValidationType
.
Path
);
ShowPopupInput
(
selections
,
OnSaveReplay
,
OnGiveUpReplay
,
InputValidation
.
ValidationType
.
Path
);
}
}
private
void
OnSaveReplay
(
string
replayName
)
private
void
OnSaveReplay
(
string
replayName
)
{
{
TcpHelper
.
SaveRecord
(
replayName
);
TcpHelper
.
SaveRecord
(
replayName
);
...
...
Assets/Scripts/MDPro3/Utility/CardImageLoader.cs
View file @
6a82457d
...
@@ -69,6 +69,7 @@ namespace MDPro3.Utility
...
@@ -69,6 +69,7 @@ namespace MDPro3.Utility
bool
persistent
=
false
,
bool
persistent
=
false
,
CancellationToken
token
=
default
)
CancellationToken
token
=
default
)
{
{
var
lockObj
=
artLoadingLocks
.
GetOrAdd
(
code
,
_
=>
new
SemaphoreSlim
(
1
,
1
));
var
lockObj
=
artLoadingLocks
.
GetOrAdd
(
code
,
_
=>
new
SemaphoreSlim
(
1
,
1
));
await
lockObj
.
WaitAsync
(
token
);
await
lockObj
.
WaitAsync
(
token
);
...
@@ -76,15 +77,18 @@ namespace MDPro3.Utility
...
@@ -76,15 +77,18 @@ namespace MDPro3.Utility
{
{
if
(
cachedArts
.
TryGetValue
(
code
,
out
var
entry
))
if
(
cachedArts
.
TryGetValue
(
code
,
out
var
entry
))
{
{
if
(
entry
.
LoadingTask
!=
null
)
if
(
entry
.
LoadingTask
!=
null
)
await
entry
.
LoadingTask
.
AsUniTask
().
AttachExternalCancellation
(
token
);
await
entry
.
LoadingTask
.
AsUniTask
().
AttachExternalCancellation
(
token
);
if
(
entry
.
Texture
!=
null
)
if
(
entry
.
Texture
!=
null
)
{
{
Interlocked
.
Increment
(
ref
entry
.
ReferenceCount
);
Interlocked
.
Increment
(
ref
entry
.
ReferenceCount
);
entry
.
IsPersistent
|=
persistent
;
entry
.
IsPersistent
|=
persistent
;
}
}
else
else
Debug
.
LogError
(
$"Art texture is null for code
{
code
}
"
);
Debug
.
LogError
(
$"Art texture is null for code
{
code
}
"
);
return
entry
.
Texture
;
return
entry
.
Texture
;
}
}
...
@@ -95,6 +99,7 @@ namespace MDPro3.Utility
...
@@ -95,6 +99,7 @@ namespace MDPro3.Utility
if
(
cachedArts
.
TryAdd
(
code
,
newEntry
))
if
(
cachedArts
.
TryAdd
(
code
,
newEntry
))
{
{
newEntry
.
ReferenceCount
=
1
;
newEntry
.
ReferenceCount
=
1
;
newEntry
.
IsPersistent
=
persistent
;
newEntry
.
IsPersistent
=
persistent
;
try
try
...
@@ -107,7 +112,7 @@ namespace MDPro3.Utility
...
@@ -107,7 +112,7 @@ namespace MDPro3.Utility
throw
ex
;
throw
ex
;
}
}
if
(
newEntry
.
Texture
==
null
)
if
(
newEntry
.
Texture
==
null
)
Debug
.
Log
(
$"
{
code
}
art is null"
);
Debug
.
Log
Error
(
$"
{
code
}
art is null"
);
newEntry
.
LoadingTask
=
null
;
newEntry
.
LoadingTask
=
null
;
return
newEntry
.
Texture
;
return
newEntry
.
Texture
;
...
@@ -151,7 +156,6 @@ namespace MDPro3.Utility
...
@@ -151,7 +156,6 @@ namespace MDPro3.Utility
{
{
var
lockObj
=
cardLoadingLocks
.
GetOrAdd
(
code
,
_
=>
new
SemaphoreSlim
(
1
,
1
));
var
lockObj
=
cardLoadingLocks
.
GetOrAdd
(
code
,
_
=>
new
SemaphoreSlim
(
1
,
1
));
await
lockObj
.
WaitAsync
(
token
);
await
lockObj
.
WaitAsync
(
token
);
try
try
{
{
if
(!
CardRenderer
.
CardHasVideoArt
(
code
)
||
forceTexture
)
if
(!
CardRenderer
.
CardHasVideoArt
(
code
)
||
forceTexture
)
...
@@ -189,18 +193,17 @@ namespace MDPro3.Utility
...
@@ -189,18 +193,17 @@ namespace MDPro3.Utility
throw
ex
;
throw
ex
;
}
}
newEntry
.
LoadingTask
=
null
;
newEntry
.
LoadingTask
=
null
;
return
newEntry
.
Texture
;
return
newEntry
.
Texture
;
}
}
else
else
{
{
Debug
.
LogError
(
"CardImageLoader: Unexpected Err
r
or."
);
Debug
.
LogError
(
"CardImageLoader: Unexpected Error."
);
return
null
;
return
null
;
}
}
}
}
else
else
{
{
if
(
cachedVideoCards
.
TryGetValue
(
code
,
out
var
tex
))
if
(
cachedVideoCards
.
TryGetValue
(
code
,
out
var
tex
))
return
tex
;
return
tex
;
Texture
texture
=
null
;
Texture
texture
=
null
;
texture
=
await
InternalLoadVideoCardAsync
(
code
,
token
);
texture
=
await
InternalLoadVideoCardAsync
(
code
,
token
);
...
@@ -290,6 +293,7 @@ namespace MDPro3.Utility
...
@@ -290,6 +293,7 @@ namespace MDPro3.Utility
lastCardFoundArt
=
false
;
lastCardFoundArt
=
false
;
return
null
;
return
null
;
}
}
if
(
needCrop
)
if
(
needCrop
)
art
=
CropCardToArt
(
art
,
code
);
art
=
CropCardToArt
(
art
,
code
);
return
art
;
return
art
;
...
@@ -320,7 +324,10 @@ namespace MDPro3.Utility
...
@@ -320,7 +324,10 @@ namespace MDPro3.Utility
}
}
return
DownloadHandlerTexture
.
GetContent
(
request
);
return
DownloadHandlerTexture
.
GetContent
(
request
);
}
}
finally
{
artSemaphore
.
Release
();
}
finally
{
artSemaphore
.
Release
();
}
}
}
private
static
async
Task
<
Texture2D
>
InternalLoadCardAsync
(
private
static
async
Task
<
Texture2D
>
InternalLoadCardAsync
(
...
@@ -333,6 +340,7 @@ namespace MDPro3.Utility
...
@@ -333,6 +340,7 @@ namespace MDPro3.Utility
try
try
{
{
var
data
=
CardsManager
.
Get
(
code
,
true
);
var
data
=
CardsManager
.
Get
(
code
,
true
);
if
(
data
.
Id
==
0
)
if
(
data
.
Id
==
0
)
{
{
...
@@ -346,7 +354,7 @@ namespace MDPro3.Utility
...
@@ -346,7 +354,7 @@ namespace MDPro3.Utility
if
(
art
==
null
)
if
(
art
==
null
)
{
{
Debug
.
Log
(
$"Get null from ArtLoad for Card
{
data
.
Id
}
:"
);
Debug
.
Log
Error
(
$"Get null from ArtLoad for Card
{
data
.
Id
}
:"
);
art
=
TextureManager
.
container
.
unknownArt
.
texture
;
art
=
TextureManager
.
container
.
unknownArt
.
texture
;
}
}
if
(!
Program
.
instance
.
cardRenderer
.
RenderCard
(
code
,
art
))
if
(!
Program
.
instance
.
cardRenderer
.
RenderCard
(
code
,
art
))
...
@@ -361,6 +369,7 @@ namespace MDPro3.Utility
...
@@ -361,6 +369,7 @@ namespace MDPro3.Utility
returnValue
.
Apply
();
returnValue
.
Apply
();
returnValue
.
name
=
"Card_"
+
code
;
returnValue
.
name
=
"Card_"
+
code
;
ReleaseArt
(
code
);
ReleaseArt
(
code
);
return
returnValue
;
return
returnValue
;
}
}
finally
{
cardSemaphore
.
Release
();
}
finally
{
cardSemaphore
.
Release
();
}
...
@@ -382,14 +391,13 @@ namespace MDPro3.Utility
...
@@ -382,14 +391,13 @@ namespace MDPro3.Utility
lastCardRenderSucceed
=
false
;
lastCardRenderSucceed
=
false
;
return
TextureManager
.
container
.
unknownCard
.
texture
;
return
TextureManager
.
container
.
unknownCard
.
texture
;
}
}
var
art
=
await
LoadArtAsync
(
code
,
false
,
token
).
AsUniTask
().
AttachExternalCancellation
(
token
);
var
art
=
await
LoadArtAsync
(
code
,
false
,
token
).
AsUniTask
().
AttachExternalCancellation
(
token
);
if
(
token
.
IsCancellationRequested
)
if
(
token
.
IsCancellationRequested
)
throw
new
OperationCanceledException
(
token
);
throw
new
OperationCanceledException
(
token
);
if
(
art
==
null
)
if
(
art
==
null
)
{
{
Debug
.
Log
(
$"Get null from ArtLoad for Card
{
data
.
Id
}
:"
);
Debug
.
Log
Error
(
$"Get null from ArtLoad for Card
{
data
.
Id
}
:"
);
art
=
TextureManager
.
container
.
unknownArt
.
texture
;
art
=
TextureManager
.
container
.
unknownArt
.
texture
;
}
}
...
@@ -558,13 +566,14 @@ namespace MDPro3.Utility
...
@@ -558,13 +566,14 @@ namespace MDPro3.Utility
private
static
async
UniTask
InitializeArtFileListAsync
()
private
static
async
UniTask
InitializeArtFileListAsync
()
{
{
if
(
artFileListInitialized
)
return
;
if
(
artFileListInitialized
)
return
;
await
UniTask
.
SwitchToThreadPool
();
//await UniTask.SwitchToThreadPool();
await
UniTask
.
Yield
();
var
path
=
Program
.
PATH_ART
;
var
path
=
Program
.
PATH_ART
;
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
path
=
Path
.
Combine
(
Application
.
persistentDataPath
,
path
);
path
=
Path
.
Combine
(
Application
.
persistentDataPath
,
path
);
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
path
=
Path
.
Combine
(
Environment
.
CurrentDirectory
,
path
);
path
=
Path
.
Combine
(
Environment
.
CurrentDirectory
,
path
);
#else
#else
path
=
Path
.
Combine
(
Environment
.
CurrentDirectory
,
path
);
path
=
Path
.
Combine
(
Environment
.
CurrentDirectory
,
path
);
#endif
#endif
...
@@ -639,19 +648,20 @@ namespace MDPro3.Utility
...
@@ -639,19 +648,20 @@ namespace MDPro3.Utility
private
static
async
UniTask
InitializeVideoArtFileListAsync
()
private
static
async
UniTask
InitializeVideoArtFileListAsync
()
{
{
if
(
videoArtFileListInitialized
)
return
;
if
(
videoArtFileListInitialized
)
return
;
await
UniTask
.
SwitchToThreadPool
();
var
path
=
Program
.
PATH_VIDEO_ART
;
var
path
=
Program
.
PATH_VIDEO_ART
;
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
path
=
Path
.
Combine
(
Application
.
persistentDataPath
,
path
);
path
=
Path
.
Combine
(
Application
.
persistentDataPath
,
path
);
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_STANDALONE_LINUX
path
=
Path
.
Combine
(
Environment
.
CurrentDirectory
,
path
);
path
=
Path
.
Combine
(
Environment
.
CurrentDirectory
,
path
);
#else
#else
path
=
Path
.
Combine
(
Environment
.
CurrentDirectory
,
path
);
path
=
Path
.
Combine
(
Environment
.
CurrentDirectory
,
path
);
#endif
#endif
if
(
Directory
.
Exists
(
path
))
if
(
Directory
.
Exists
(
path
))
{
{
//await UniTask.SwitchToThreadPool();
await
UniTask
.
Yield
();
foreach
(
var
file
in
Directory
.
GetFiles
(
path
,
"*.mp4"
))
foreach
(
var
file
in
Directory
.
GetFiles
(
path
,
"*.mp4"
))
{
{
var
fileName
=
Path
.
GetFileNameWithoutExtension
(
file
);
var
fileName
=
Path
.
GetFileNameWithoutExtension
(
file
);
...
...
Assets/Tools/BetterStreamingAssets/BSA_BetterStreamingAssets.cs
View file @
6a82457d
// Better Streaming Assets, Piotr Gwiazdowski <gwiazdorrr+github at gmail.com>, 2017
// Better Streaming Assets, Piotr Gwiazdowski <gwiazdorrr+github at gmail.com>, 2017
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -642,12 +642,12 @@ public static partial class BetterStreamingAssets
...
@@ -642,12 +642,12 @@ public static partial class BetterStreamingAssets
}
}
else
else
{
{
Debug
.
LogAssertionFormat
(
$"BetterStreamingAssets: file
{
fileName
}
is where Streaming Assets are put, but is compressed. "
+
//
Debug.LogAssertionFormat($"BetterStreamingAssets: file {fileName} is where Streaming Assets are put, but is compressed. " +
$"If this is a App Bundle build, see README.md for a possible workaround. "
+
//
$"If this is a App Bundle build, see README.md for a possible workaround. " +
$"If this file is not a Streaming Asset (has been on purpose by hand or by another plug-in), handle "
+
//
$"If this file is not a Streaming Asset (has been on purpose by hand or by another plug-in), handle " +
$"
{
nameof
(
CompressedStreamingAssetFound
)}
event or implement "
+
//
$"{nameof(CompressedStreamingAssetFound)} event or implement " +
$"
{
nameof
(
AndroidIsCompressedFileStreamingAsset
)}
partial method to prevent "
+
//
$"{nameof(AndroidIsCompressedFileStreamingAsset)} partial method to prevent " +
$"this message from appearing again. "
);
//
$"this message from appearing again. ");
}
}
}
}
#endif
#endif
...
...
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