예제 #1
0
    protected ImageCaptureTool.CaptureResult Capture()
    {
        Camera camera = this.camera ?? Camera.main;

        int[] gameViewResolution = GetGameViewResolution();
        int   imageWidth         = (this.imageWidth == 0 ? gameViewResolution[0] : this.imageWidth) * this.imageScale;
        int   imageHeight        = (this.imageHeight == 0 ? gameViewResolution[1] : this.imageHeight) * this.imageScale;

        ImageCaptureTool.CaptureResult result
            = ImageCaptureTool.Capture(camera,
                                       imageWidth,
                                       imageHeight,
                                       this.clearBack,
                                       this.outputDirectory,
                                       this.outputFileName
                                       + this.outputFileNameIndex.ToString());

        if (result.success)
        {
            this.ShowNotification(new GUIContent("SUCCESS : " + result.outputPath));
            this.outputFileNameIndex++;
        }
        else
        {
            this.ShowNotification(new GUIContent("ERROR : " + result.outputPath));
        }

        return(result);
    }
예제 #2
0
 protected virtual void HookAfterImageCaptured(ImageCaptureTool.CaptureResult result)
 {
     // Nothing to do in here. This is used for inheritance.
 }