일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- SERIAL
- length
- memory
- Unity
- parameter
- wpf
- file access
- Barcode
- mfc
- public
- Pointer
- preprocessing
- APP
- Android
- c++
- inheritance
- Contour
- stream
- digitalRead
- aduino
- atmega328
- Class
- flutter
- UNO
- Read
- Overloading
- compare
- sensor
- java
- Encapusulation
- Today
- Total
폴크(FOLC)
Unity - Android 연동 ( Message to Flutter ) 본문
1. UnityMessageManager 이용
> NativeAPI.cs + SingletonMonoBehaviour.cs + UnityMessageManager.cs
* 소스 코드 ( script.cs )
> using System.Collections;
> using System.Collections.Generic;
> using UnityEngine;
> using UnityEngine.XR;
> using UnityEngine.XR.ARFoundation;
> public class MessageTest : MonoBehaviour
> {
> public UnityMessageManager unitymessageManager;
> void Awake()
> {
> unitymessageManager = gameObject.AddComponent(typeof(UnityMessageManager)) as UnityMessageManager;
> }
> void UserFunction()
> {
> // This method is used to send data to Flutter
> unitymessageManager.SendMessageToFlutter( name );
> }
> }
'Unity > Unity 사용법' 카테고리의 다른 글
Unity - 버튼에 이미지 표시 (0) | 2021.10.07 |
---|---|
Unity S/W - 예외처리3 (0) | 2021.08.17 |
Unity S/W - 예외처리2 (0) | 2021.08.17 |
Unity S/W - 예외처리1 (0) | 2021.08.06 |
Unity - Android 연동 ( AR 테스트 ) (0) | 2021.07.09 |