1
0
mirror of synced 2025-01-31 04:13:43 +01:00

fix capture white scree issue (maybe)

This commit is contained in:
xpeng 2022-06-08 02:27:32 +02:00
parent 14ae2a7c01
commit 8b1c0ce92b
6 changed files with 26 additions and 8 deletions

22
.gitignore vendored
View File

@ -8,16 +8,20 @@
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Recordings can get excessive in size
/[Rr]ecordings/
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains*
/[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
@ -53,11 +57,20 @@ sysinfo.txt
# Builds
*.apk
*.aab
*.unitypackage
*.app
# Crashlytics generated file
crashlytics-build.properties
# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
# WACVR-specific
uWindowCapture.log
@ -65,4 +78,5 @@ uWindowCapture.log
.vscode/
# Game configuration file
config.json
config.json

View File

@ -6,7 +6,7 @@ LightingSettings:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Lighting Settings
m_Name: Default Lighting
serializedVersion: 4
m_GIWorkflowMode: 0
m_EnableBakedLightmaps: 1

View File

@ -2138,7 +2138,7 @@ MonoBehaviour:
createChildWindows_: 0
childWindowPrefab: {fileID: 0}
childWindowZDistance: 0.02
partialWindowTitle_: Mercury
partialWindowTitle_: 'Mercury '
desktopIndex_: 0
captureMode: 1
capturePriority: 0

View File

@ -174,7 +174,8 @@ public class UwcManager : MonoBehaviour
{
Lib.Update(Time.deltaTime);
UpdateWindowInfo();
UpdateMessages();
if (!UwcWindowTexture.isWindowCaptured)
UpdateMessages();
UpdateWindowTitles();
}
@ -210,6 +211,7 @@ public class UwcManager : MonoBehaviour
}
case MessageType.WindowRemoved: {
var window = Find(id);
Debug.Log(id);
if (window != null) {
window.isAlive = false;
if (window.parentWindow != null) {

View File

@ -196,6 +196,7 @@ public class UwcWindowTexture : MonoBehaviour
return window != null && window.isValid;
}
}
static public bool isWindowCaptured = false;
Material material_;
Renderer renderer_;
@ -224,7 +225,8 @@ public class UwcWindowTexture : MonoBehaviour
{
UpdateSearchTiming();
UpdateTargetWindow();
if (!isWindowCaptured)
isWindowCaptured = window != null && window.isValid;
if (!isValid) {
material_.mainTexture = null;
return;