static NativeBinding() { #if UNITY_ANDROID && !UNITY_EDITOR m_implementation = new NativeImplementationAndroid(); #elif UNITY_IOS && !UNITY_EDITOR m_implementation = new NativeImplementationIOS(); #else m_implementation = new NativeImplementationEditor(); #endif }
public void Initialize <TNativeImplementation>() where TNativeImplementation : INativeImplementation, new() { if (implementation != null) { return; } else { implementation = new TNativeImplementation(); } }
static Keyboard() { if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { impl = OSX.Instance; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { impl = Windows.Instance; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { impl = Linux.Instance; } else { throw new NotSupportedException(); } }
public static void OverrideNativeImplementation(INativeImplementation nativeImplementation) => ExposureNotification.nativeImplementation = nativeImplementation;