diff --git a/README.md b/README.md
index 5587f43..c5bd13f 100644
--- a/README.md
+++ b/README.md
@@ -9,26 +9,15 @@ Capture camera image and save to a specified path.
[Full Documentation](https://blightue.github.io/CameraImageCapture/)
## Installation instructions
+### Add the line below to `Packages/manifest.json`
-### Unity package manager(Git)
-
-1. Go to **Package Manager** window via `Window/Package Manager`
-2. Click the **add** ![img](https://docs.unity3d.com/uploads/Main/iconAdd.png) button in the status bar
-3. Select **Add package from git URL** from the add menu
-4. Fill the git URL with https://github.com/blightue/UnityCameraImageCapture.git and click **Add**
-
-### Unity package manager(Local)
-
-1. Download and unzip the source code to your disk
-2. Go to **Package Manager** window via `Window/Package Manager`
-3. Click the **add** ![img](https://docs.unity3d.com/uploads/Main/iconAdd.png) button in the status bar
-4. Select **Add package from disk** from the add menu
-5. Select the **package.json** file in the unzipped folder
+for version `1.0.0`
+```csharp
+"net.suisuishou.cameraimagecapture":"https://github.com/wolf-org/CameraImageCapture.git#1.0.0",
+```
## Quick Start
-### Version 0.5.0 Update:
-
Recommend use component **Capture with config**
Create a config asset by click the plus button in the Project window and follow `Camera Image Capture/Capturer config`
diff --git a/RunTime/Photographer.cs b/RunTime/Photographer.cs
index 094daa9..fee8bdb 100644
--- a/RunTime/Photographer.cs
+++ b/RunTime/Photographer.cs
@@ -8,43 +8,87 @@ namespace SuiSuiShou.CIC.Core
public static class Photographer
{
private static ImageCapture _imageCapture = new ImageCapture();
-
+
///
/// Capture image resolution
///
- public static Vector2Int ImageResolution { get => _imageCapture.ImageResolution; set => _imageCapture.ImageResolution = value; }
+ public static Vector2Int ImageResolution
+ {
+ get => _imageCapture.ImageResolution;
+ set => _imageCapture.ImageResolution = value;
+ }
+
///
/// Target camera for capturing
///
- public static Camera TargetCamera { get => _imageCapture.TargetCamera; set => _imageCapture.TargetCamera = value; }
+ public static Camera TargetCamera
+ {
+ get => _imageCapture.TargetCamera;
+ set => _imageCapture.TargetCamera = value;
+ }
+
///
/// Image file write type
///
- public static WriteFileType WriteType { get => _imageCapture.WriteType; set => _imageCapture.WriteType = value; }
+ public static WriteFileType WriteType
+ {
+ get => _imageCapture.WriteType;
+ set => _imageCapture.WriteType = value;
+ }
+
///
/// Image type
///
- public static ImageFormat ImageFormat { get => _imageCapture.ImageFormat; set => _imageCapture.ImageFormat = value; }
+ public static ImageFormat ImageFormat
+ {
+ get => _imageCapture.ImageFormat;
+ set => _imageCapture.ImageFormat = value;
+ }
+
///
/// True for logging capture status
///
- public static bool IsLogCap { get => _imageCapture.IsLogCap; set => _imageCapture.IsLogCap = value; }
+ public static bool IsLogCap
+ {
+ get => _imageCapture.IsLogCap;
+ set => _imageCapture.IsLogCap = value;
+ }
+
///
/// True for sequential image file name
///
- public static bool IsImageSerial { get => _imageCapture.IsImageSerial; set => _imageCapture.IsImageSerial = value; }
+ public static bool IsImageSerial
+ {
+ get => _imageCapture.IsImageSerial;
+ set => _imageCapture.IsImageSerial = value;
+ }
+
///
/// True for changing ImageResolution in editor
///
- public static bool IsOverrideCameraResolution { get => _imageCapture.IsOverrideCameraResolution; set => _imageCapture.IsOverrideCameraResolution = value; }
+ public static bool IsOverrideCameraResolution
+ {
+ get => _imageCapture.IsOverrideCameraResolution;
+ set => _imageCapture.IsOverrideCameraResolution = value;
+ }
+
///
/// Fold path for image file to writing
///
- public static string SaveFolderPath { get => _imageCapture.SaveFolderPath; set => _imageCapture.SaveFolderPath = value; }
+ public static string SaveFolderPath
+ {
+ get => _imageCapture.SaveFolderPath;
+ set => _imageCapture.SaveFolderPath = value;
+ }
+
///
/// Image file name
///
- public static string FileName { get => _imageCapture.FileName; set => _imageCapture.FileName = value; }
+ public static string FileName
+ {
+ get => _imageCapture.FileName;
+ set => _imageCapture.FileName = value;
+ }
///
/// Capture and save image file base on this singleton config
@@ -53,6 +97,11 @@ public static void CaptureAndSaveImage()
{
_imageCapture.CaptureAndSaveImage();
}
+
+ public static Texture2D CaptureImage(int depth)
+ {
+ return _imageCapture.CaptureImage(TargetCamera, ImageResolution, depth);
+ }
}
internal class ImageCapture : ICameraImageCaptureCore
diff --git a/package.json b/package.json
index af33e8c..0c564a2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "net.suisuishou.cameraimagecapture",
- "version": "0.6.5",
+ "version": "1.0.0",
"displayName": "CameraImageCapture",
"description": "Capture camera image and save to a specified path.",
"unity": "2020.1",