Skip to content

Releases: SeenWonderAlex/UnityScreenCaptureBlocker

v1.1.0

18 May 20:09
47a398d

Choose a tag to compare

This update adds the following

  • QuickTime Recording on Mac can now be blocked.
  • Semi-performance optimizations for block calls.

Start using this plugin now by importing this package in your project and simply adding one line of code:

Using the Code (How to Block using Script)

Simply, to start blocking screenshots, you need to add this one line of code:

ScreenCaptureBlocker.Capture.ProtectWindowContent();

You can include this anywhere on runtime, commonly at Start() or Awake().

For example, if there's a certain area that you don't want the user to see and capture anything, use this on your code.

And if they exit the area, you can unblock it using:

ScreenCaptureBlocker.Capture.UnprotectWindowContent();

Here's a example code usage:

using UnityEngine;
using ScreenCaptureBlocker;
    
public class ExampleScript : MonoBehaviour 
{
  private bool VarA = false;
  private void Start()
  {
    Capture.ProtectWindowContent(); // Blocks screenshotting at start of the game.
  }
  
  private void Update()
  {
    if (!VarA && Time.timeSinceLevelLoad >= 15f) // If 15 seconds past, unblock screenshotting.
    {
      VarA = true;
      Capture.UnprotectWindowContent();
    }
  }
}

v1.0.0

09 May 00:12
e81d8ef

Choose a tag to compare

Start using this plugin now by importing this package in your project and simply adding one line of code:

Using the Code (How to Block using Script)

Simply, to start blocking screenshots, you need to add this one line of code:

ScreenCaptureBlocker.Capture.ProtectWindowContent();

You can include this anywhere on runtime, commonly at Start() or Awake().

For example, if there's a certain area that you don't want the user to see and capture anything, use this on your code.

And if they exit the area, you can unblock it using:

ScreenCaptureBlocker.Capture.UnprotectWindowContent();

Here's a example code usage:

using UnityEngine;
using ScreenCaptureBlocker;
    
public class ExampleScript : MonoBehaviour 
{
  private bool VarA = false;
  private void Start()
  {
    Capture.ProtectWindowContent(); // Blocks screenshotting at start of the game.
  }
  
  private void Update()
  {
    if (!VarA && Time.timeSinceLevelLoad >= 15f) // If 15 seconds past, unblock screenshotting.
    {
      VarA = true;
      Capture.UnprotectWindowContent();
    }
  }
}