Example #1
0
        private void Awake()
        {
#if UNITY_EDITOR
            Debug.LogWarning("Native NFC can't be accessed in the Editor");
#elif UNITY_ANDROID
            nfc = gameObject.AddComponent <AndroidNFC>();
            nfc.Initialize();
#elif UNITY_IOS
            nfc = gameObject.AddComponent <IOSNFC>();
            nfc.Initialize();
#else
            Debug.LogWarning("Native NFC is only supported on Android");
#endif
        }