This file contains 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
Assets/ | |
├── Editor | |
│ ├── BL_BuildPostProcess.cs | |
│ └── BL_BuildPostProcess.cs.meta | |
├── Editor.meta | |
├── Plugins | |
│ ├── Android | |
│ │ ├── AgoraRtcEngineKit.plugin | |
│ │ │ ├── AndroidManifest.xml | |
│ │ │ ├── AndroidManifest.xml.meta |
This file contains 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; | |
using agora_gaming_rtc; | |
using agora_utilities; | |
using System; | |
using System.Collections; | |
// this is an example of using Agora Unity SDK |
This file contains 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; | |
using agora_gaming_rtc; | |
using agora_utilities; | |
using System; | |
using System.Collections; | |
// this is an example of using Agora Unity SDK |
This file contains 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
public interface IVideoChatClient | |
{ | |
void join(string channel); | |
void leave(); | |
void loadEngine(string appId); | |
void unloadEngine(); | |
void onSceneLoaded(); | |
void EnableVideo(bool enable); | |
} |
This file contains 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
// Push frame to the remote client | |
IEnumerator PushFrame(byte[] bytes, int width, int height, System.Action onFinish) | |
{ | |
if (bytes == null || bytes.Length == 0) | |
{ | |
Debug.LogError("Zero bytes found!!!!"); | |
yield break; | |
} | |
IRtcEngine rtc = IRtcEngine.QueryEngine(); |
This file contains 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
public void join(string channel) | |
{ | |
Debug.Log("calling join (channel = " + channel + ")"); | |
if (mRtcEngine == null) | |
return; | |
// set callbacks (optional) | |
mRtcEngine.OnJoinChannelSuccess = onJoinChannelSuccess; | |
mRtcEngine.OnUserJoined = onUserJoined; |
This file contains 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
int dotCount = 0; | |
/// <summary> | |
/// | |
/// </summary> | |
/// <param name="pos">Screen Position</param> | |
void DrawDot(Vector2 pos) | |
{ | |
if (anchorGO == null) | |
{ | |
anchorGO = new GameObject(); |
This file contains 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
IEnumerator CoProcessDrawing(DrawmarkModel dm) | |
{ | |
string json = JsonUtility.ToJson(dm); | |
if (dataStreamId > 0) | |
{ | |
rtcEngine.SendStreamMessage(dataStreamId, json); | |
} | |
yield return null; | |
} |
This file contains 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
[Serializable] | |
public class DrawmarkModel | |
{ | |
public Color color; | |
public List<Vector2> points; | |
} |