@@ -8,43 +8,87 @@ namespace SuiSuiShou.CIC.Core
8
8
public static class Photographer
9
9
{
10
10
private static ImageCapture _imageCapture = new ImageCapture ( ) ;
11
-
11
+
12
12
/// <summary>
13
13
/// Capture image resolution
14
14
/// </summary>
15
- public static Vector2Int ImageResolution { get => _imageCapture . ImageResolution ; set => _imageCapture . ImageResolution = value ; }
15
+ public static Vector2Int ImageResolution
16
+ {
17
+ get => _imageCapture . ImageResolution ;
18
+ set => _imageCapture . ImageResolution = value ;
19
+ }
20
+
16
21
/// <summary>
17
22
/// Target camera for capturing
18
23
/// </summary>
19
- public static Camera TargetCamera { get => _imageCapture . TargetCamera ; set => _imageCapture . TargetCamera = value ; }
24
+ public static Camera TargetCamera
25
+ {
26
+ get => _imageCapture . TargetCamera ;
27
+ set => _imageCapture . TargetCamera = value ;
28
+ }
29
+
20
30
/// <summary>
21
31
/// Image file write type
22
32
/// </summary>
23
- public static WriteFileType WriteType { get => _imageCapture . WriteType ; set => _imageCapture . WriteType = value ; }
33
+ public static WriteFileType WriteType
34
+ {
35
+ get => _imageCapture . WriteType ;
36
+ set => _imageCapture . WriteType = value ;
37
+ }
38
+
24
39
/// <summary>
25
40
/// Image type
26
41
/// </summary>
27
- public static ImageFormat ImageFormat { get => _imageCapture . ImageFormat ; set => _imageCapture . ImageFormat = value ; }
42
+ public static ImageFormat ImageFormat
43
+ {
44
+ get => _imageCapture . ImageFormat ;
45
+ set => _imageCapture . ImageFormat = value ;
46
+ }
47
+
28
48
/// <summary>
29
49
/// True for logging capture status
30
50
/// </summary>
31
- public static bool IsLogCap { get => _imageCapture . IsLogCap ; set => _imageCapture . IsLogCap = value ; }
51
+ public static bool IsLogCap
52
+ {
53
+ get => _imageCapture . IsLogCap ;
54
+ set => _imageCapture . IsLogCap = value ;
55
+ }
56
+
32
57
/// <summary>
33
58
/// True for sequential image file name
34
59
/// </summary>
35
- public static bool IsImageSerial { get => _imageCapture . IsImageSerial ; set => _imageCapture . IsImageSerial = value ; }
60
+ public static bool IsImageSerial
61
+ {
62
+ get => _imageCapture . IsImageSerial ;
63
+ set => _imageCapture . IsImageSerial = value ;
64
+ }
65
+
36
66
/// <summary>
37
67
/// True for changing ImageResolution in editor
38
68
/// </summary>
39
- public static bool IsOverrideCameraResolution { get => _imageCapture . IsOverrideCameraResolution ; set => _imageCapture . IsOverrideCameraResolution = value ; }
69
+ public static bool IsOverrideCameraResolution
70
+ {
71
+ get => _imageCapture . IsOverrideCameraResolution ;
72
+ set => _imageCapture . IsOverrideCameraResolution = value ;
73
+ }
74
+
40
75
/// <summary>
41
76
/// Fold path for image file to writing
42
77
/// </summary>
43
- public static string SaveFolderPath { get => _imageCapture . SaveFolderPath ; set => _imageCapture . SaveFolderPath = value ; }
78
+ public static string SaveFolderPath
79
+ {
80
+ get => _imageCapture . SaveFolderPath ;
81
+ set => _imageCapture . SaveFolderPath = value ;
82
+ }
83
+
44
84
/// <summary>
45
85
/// Image file name
46
86
/// </summary>
47
- public static string FileName { get => _imageCapture . FileName ; set => _imageCapture . FileName = value ; }
87
+ public static string FileName
88
+ {
89
+ get => _imageCapture . FileName ;
90
+ set => _imageCapture . FileName = value ;
91
+ }
48
92
49
93
/// <summary>
50
94
/// Capture and save image file base on this singleton config
@@ -53,6 +97,11 @@ public static void CaptureAndSaveImage()
53
97
{
54
98
_imageCapture . CaptureAndSaveImage ( ) ;
55
99
}
100
+
101
+ public static Texture2D CaptureImage ( int depth )
102
+ {
103
+ return _imageCapture . CaptureImage ( TargetCamera , ImageResolution , depth ) ;
104
+ }
56
105
}
57
106
58
107
internal class ImageCapture : ICameraImageCaptureCore
0 commit comments