您不能選擇超過 %s 個話題 話題必須以字母或數字為開頭,可包含連接號 ('-') 且最長為 35 個字
 
 
 

25 行
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. }