This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <AVFoundation/AVFoundation.h> | |
extern "C" { | |
void _EnableFlashlight(bool enable) { | |
AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; | |
if ([device hasTorch]) { | |
[device lockForConfiguration:nil]; | |
[device setTorchMode:enable ? AVCaptureTorchModeOn : AVCaptureTorchModeOff]; | |
[device unlockForConfiguration]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
public static class UIExtensions { | |
// Shared array used to receive result of RectTransform.GetWorldCorners | |
static Vector3[] corners = new Vector3[4]; | |
/// <summary> | |
/// Transform the bounds of the current rect transform to the space of another transform. | |
/// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2015, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule normalizeWheel | |
* @typechecks |