Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

25 wiersze
560 B

  1. using System;
  2. using UnityEngine;
  3. namespace CI.WSANative.Device
  4. {
  5. public static class WSANativeDevice
  6. {
  7. public static void EnableFlashlight(WSANativeColour colour = null)
  8. {
  9. }
  10. public static void DisableFlashlight()
  11. {
  12. }
  13. public static byte[] CaptureScreenshot()
  14. {
  15. Texture2D texture2D = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);
  16. texture2D.ReadPixels(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), 0, 0);
  17. texture2D.Apply();
  18. return texture2D.EncodeToPNG();
  19. }
  20. }
  21. }