Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Assets/uWindowCapture/Editor/UwcWindowTextureEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ string error
SerializedProperty captureRequestTiming;
SerializedProperty captureFrameRate;
SerializedProperty drawCursor;
SerializedProperty defaultTexture;
SerializedProperty scaleControlType;
SerializedProperty scalePer1000Pixel;

Expand All @@ -60,6 +61,7 @@ void OnEnable()
captureRequestTiming = serializedObject.FindProperty("captureRequestTiming");
captureFrameRate = serializedObject.FindProperty("captureFrameRate");
drawCursor = serializedObject.FindProperty("drawCursor");
defaultTexture = serializedObject.FindProperty("defaultTexture");
scaleControlType = serializedObject.FindProperty("scaleControlType");
scalePer1000Pixel = serializedObject.FindProperty("scalePer1000Pixel");
}
Expand Down Expand Up @@ -150,6 +152,7 @@ void DrawCaptureSettings()
EditorGUILayout.PropertyField(captureRequestTiming);
EditorGUILayout.PropertyField(captureFrameRate);
EditorGUILayout.PropertyField(drawCursor);
EditorGUILayout.PropertyField(defaultTexture);

EditorGUILayout.Space();
}
Expand Down Expand Up @@ -189,4 +192,4 @@ void DrawWindowInformation()
}
}

}
}
5 changes: 3 additions & 2 deletions Assets/uWindowCapture/Runtime/UwcWindowTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public int desktopIndex
public WindowTextureCaptureTiming captureRequestTiming = WindowTextureCaptureTiming.OnlyWhenVisible;
public int captureFrameRate = 30;
public bool drawCursor = true;
public Texture defaultTexture = null;
public bool updateTitle = true;
public bool searchAnotherWindowWhenInvalid = false;

Expand Down Expand Up @@ -226,7 +227,7 @@ void Update()
UpdateTargetWindow();

if (!isValid) {
material_.mainTexture = null;
material_.mainTexture = defaultTexture;
return;
}

Expand Down Expand Up @@ -438,4 +439,4 @@ static public RayCastResult RayCast(Vector3 from, Vector3 dir, float distance, L
}
}

}
}