1
0
mirror of synced 2025-02-12 09:03:02 +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

20
.gitignore vendored
View File

@ -8,16 +8,20 @@
/[Bb]uild/ /[Bb]uild/
/[Bb]uilds/ /[Bb]uilds/
/[Ll]ogs/ /[Ll]ogs/
/[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/ /[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored # Recordings can get excessive in size
!/[Aa]ssets/**/*.meta /[Rr]ecordings/
# Uncomment this line if you wish to ignore the asset store tools plugin # Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools* # /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin # Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains* /[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory # Visual Studio cache directory
.vs/ .vs/
@ -53,11 +57,20 @@ sysinfo.txt
# Builds # Builds
*.apk *.apk
*.aab
*.unitypackage *.unitypackage
*.app
# Crashlytics generated file # Crashlytics generated file
crashlytics-build.properties 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 # WACVR-specific
uWindowCapture.log uWindowCapture.log
@ -66,3 +79,4 @@ uWindowCapture.log
# Game configuration file # Game configuration file
config.json config.json

View File

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

View File

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

View File

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

View File

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