├── Hello-Video-Unity-Agora ├── ProjectSettings │ ├── ProjectVersion.txt │ ├── AudioManager.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── EditorSettings.asset │ ├── NetworkManager.asset │ ├── DynamicsManager.asset │ ├── GraphicsSettings.asset │ ├── Physics2DSettings.asset │ ├── ProjectSettings.asset │ ├── QualitySettings.asset │ ├── ClusterInputManager.asset │ ├── EditorBuildSettings.asset │ └── UnityConnectSettings.asset ├── Assets │ ├── AgoraEngine │ │ ├── .gitignore │ │ ├── Plugins │ │ │ ├── iOS │ │ │ │ ├── PLACEHOLDER │ │ │ │ └── PLACEHOLDER.meta │ │ │ ├── Android │ │ │ │ ├── AgoraRtcEngineKit.plugin │ │ │ │ │ ├── libs │ │ │ │ │ │ ├── PLACEHOLDER │ │ │ │ │ │ ├── x86 │ │ │ │ │ │ │ ├── PLACEHOLDER │ │ │ │ │ │ │ └── PLACEHOLDER.meta │ │ │ │ │ │ ├── arm64-v8a │ │ │ │ │ │ │ └── PLACEHOLDER │ │ │ │ │ │ └── armeabi-v7a │ │ │ │ │ │ │ ├── PLACEHOLDER │ │ │ │ │ │ │ └── PLACEHOLDER.meta │ │ │ │ │ ├── project.properties.meta │ │ │ │ │ ├── AndroidManifest.xml.meta │ │ │ │ │ ├── libs.meta │ │ │ │ │ ├── project.properties │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── AgoraRtcEngineKit.plugin.meta │ │ │ ├── iOS.meta │ │ │ └── Android.meta │ │ ├── Scripts │ │ │ ├── AgoraGamingSDK │ │ │ │ ├── PLACEHOLDER │ │ │ │ └── PLACEHOLDER.meta │ │ │ ├── AgoraTools │ │ │ │ ├── signcode.sh.meta │ │ │ │ ├── prep_codesign.sh.meta │ │ │ │ ├── signcode.sh │ │ │ │ └── prep_codesign.sh │ │ │ ├── AgoraTools.meta │ │ │ └── AgoraGamingSDK.meta │ │ ├── Demo │ │ │ ├── SceneHome.unity │ │ │ ├── SceneHelloVideo.unity │ │ │ ├── SceneHome.unity.meta │ │ │ ├── SceneHelloVideo.unity.meta │ │ │ ├── ButtonHandler.cs.meta │ │ │ ├── UIElementDragger.cs.meta │ │ │ ├── TestHome.cs.meta │ │ │ ├── TestHelloUnityVideo.cs.meta │ │ │ ├── UIElementDragger.cs │ │ │ ├── ButtonHandler.cs │ │ │ ├── TestHome.cs │ │ │ └── TestHelloUnityVideo.cs │ │ ├── README_QuickStart.pdf │ │ ├── README_ARFoundation.pdf │ │ ├── README_QuickStart.pdf.meta │ │ ├── releaseHistory.md.meta │ │ ├── Demo.meta │ │ ├── README_ARFoundation.pdf.meta │ │ ├── Editor.meta │ │ ├── Plugins.meta │ │ ├── Scripts.meta │ │ ├── Editor │ │ │ ├── BL_BuildPostProcess.cs.meta │ │ │ └── BL_BuildPostProcess.cs │ │ └── releaseHistory.md │ └── AgoraEngine.meta ├── .gitignore ├── LICENSE.md ├── README.zh.md └── README.md └── Hello-Video-Unity-Agora-with-Texture ├── ProjectSettings ├── ProjectVersion.txt ├── TagManager.asset ├── TimeManager.asset ├── AudioManager.asset ├── EditorSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PresetManager.asset ├── DynamicsManager.asset ├── GraphicsSettings.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── ClusterInputManager.asset ├── EditorBuildSettings.asset ├── Physics2DSettings.asset └── UnityConnectSettings.asset ├── Assets ├── Scene1.unity ├── .example.cs.swp ├── Editor.meta ├── Plugins │ ├── MAC.meta │ ├── Android │ │ └── AgoraRtcEngineKit.plugin │ │ │ ├── project.properties.meta │ │ │ ├── AndroidManifest.xml.meta │ │ │ ├── libs.meta │ │ │ ├── project.properties │ │ │ └── AndroidManifest.xml │ ├── iOS.meta │ └── Android.meta ├── Scene0.unity.meta ├── Scene1.unity.meta ├── Plugins.meta ├── Scripts.meta ├── example.cs.meta ├── ButtonClick.cs.meta ├── Editor │ ├── BL_BuildPostProcess.cs.meta │ └── BL_BuildPostProcess.cs ├── example.cs └── ButtonClick.cs ├── readme.txt ├── .gitignore ├── README └── .vscode └── settings.json /Hello-Video-Unity-Agora/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.4.35f1 2 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.2.21f1 2 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/.gitignore: -------------------------------------------------------------------------------- 1 | /Demo/README* 2 | /Plugins 3 | /Scripts/AgoraGamingSDK 4 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/iOS/PLACEHOLDER: -------------------------------------------------------------------------------- 1 | AgoraRtcEngineKit.framework 2 | libagoraSdkCWrapper.a 3 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/libs/PLACEHOLDER: -------------------------------------------------------------------------------- 1 | agora-rtc-sdk.jar 2 | agora-unity-wrapper.jar 3 | 4 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts/AgoraGamingSDK/PLACEHOLDER: -------------------------------------------------------------------------------- 1 | AgoraGamingRtcEngine.cs 2 | AudioEffectManager.cs 3 | VideoSurface.cs 4 | 5 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/libs/x86/PLACEHOLDER: -------------------------------------------------------------------------------- 1 | libagora-rtc-sdk-jni.so 2 | libagoraSdkCWrapper.so 3 | 4 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/libs/arm64-v8a/PLACEHOLDER: -------------------------------------------------------------------------------- 1 | libagora-rtc-sdk-jni.so 2 | libagoraSdkCWrapper.so 3 | 4 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/libs/armeabi-v7a/PLACEHOLDER: -------------------------------------------------------------------------------- 1 | libagora-rtc-sdk-jni.so 2 | libagoraSdkCWrapper.so 3 | 4 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Scene1.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/Assets/Scene1.unity -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/.example.cs.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/Assets/.example.cs.swp -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/SceneHome.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/SceneHome.unity -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/README_QuickStart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/Assets/AgoraEngine/README_QuickStart.pdf -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/README_ARFoundation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/Assets/AgoraEngine/README_ARFoundation.pdf -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/SceneHelloVideo.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/SceneHelloVideo.unity -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/PresetManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AgoraIO/Video-Call-for-Mobile-Gaming/HEAD/Hello-Video-Unity-Agora-with-Texture/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f74c3b19dcd04524aef6f9496c678c3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/README_QuickStart.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f044fa9705daa454c86b72509d49f997 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/releaseHistory.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4031688e4c29044ffae555e0a552603f 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 210d4a6172d934163920dec93d3f2355 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/iOS/PLACEHOLDER.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cee74427acccc4427b9bb7f8a03dbb6c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/README_ARFoundation.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f50e2cdd342244f5ca9a1ad9c2552853 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48420c232116040f8848a80d0fd94c8c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts/AgoraTools/signcode.sh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15c31db4db4b84ae4ba20074419ec455 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins/MAC.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3087d88e8f254b33a40935dde57c7cb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts/AgoraGamingSDK/PLACEHOLDER.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2bad4382a5e84e7193e5ca579ebad22 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts/AgoraTools/prep_codesign.sh.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5926ef530033444d885a646fe459715 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts/AgoraTools.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5929916f47d484b24a3f515177ff3882 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/SceneHome.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11e44933caff747879b06a78a609ddfe 3 | timeCreated: 1501587297 4 | licenseType: Store 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/SceneHelloVideo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38239e0a3e78848d8a1e3b083920e199 3 | timeCreated: 1501587309 4 | licenseType: Store 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6228e9950c8a5403caa8fda6322e9938 3 | folderAsset: yes 4 | timeCreated: 1501591636 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 757d78e531f20483baad1200a9b2ac13 3 | folderAsset: yes 4 | timeCreated: 1501554094 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5eadb7535b9d14e729a7628edd5c93dd 3 | folderAsset: yes 4 | timeCreated: 1501601497 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/iOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee2c179a9ef79458e893ae6465467a17 3 | folderAsset: yes 4 | timeCreated: 1501554094 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf259350c6d38461d9d895760578e299 3 | folderAsset: yes 4 | timeCreated: 1501554094 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Scene0.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8ecce40c89c6461bb277e77e1dcc88c 3 | timeCreated: 1526275866 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Scene1.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 139209c2f33044547a1824cd7b03579d 3 | timeCreated: 1526275866 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts/AgoraGamingSDK.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6dc8e03941c25453b885b09199b884a2 3 | folderAsset: yes 4 | timeCreated: 1501601497 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins/Android/AgoraRtcEngineKit.plugin/project.properties.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b94a675a86e5c4225a3f90bd04fcf880 3 | timeCreated: 1488448432 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/libs/x86/PLACEHOLDER.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05f0adc51683e43dda94c4d2f1358d7f 3 | timeCreated: 1501582634 4 | licenseType: Store 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/project.properties.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b94a675a86e5c4225a3f90bd04fcf880 3 | timeCreated: 1488448432 4 | licenseType: Store 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f5a065f6745c40e6803ccd2ba46d9db 3 | folderAsset: yes 4 | timeCreated: 1516604677 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins/Android/AgoraRtcEngineKit.plugin/AndroidManifest.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fd52e7b774d043059bfba0484f4a7f1 3 | timeCreated: 1501554097 4 | licenseType: Free 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9230b1daf2f3c4aabb7798491333f745 3 | folderAsset: yes 4 | timeCreated: 1526277464 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/AndroidManifest.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fd52e7b774d043059bfba0484f4a7f1 3 | timeCreated: 1501554097 4 | licenseType: Store 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins/iOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a33663c22c15146bdb852fa62d54dd6d 3 | folderAsset: yes 4 | timeCreated: 1526448383 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/libs/armeabi-v7a/PLACEHOLDER.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 912e76ef38bb14ea2b2df8e975682e34 3 | timeCreated: 1501582634 4 | licenseType: Store 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4c031d8eb5324c32b33fd6d748c3df9 3 | folderAsset: yes 4 | timeCreated: 1526281476 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins/Android/AgoraRtcEngineKit.plugin/libs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84fc031d6c5fa48baa358dc4a9a5b0e6 3 | folderAsset: yes 4 | timeCreated: 1501554094 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/libs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84fc031d6c5fa48baa358dc4a9a5b0e6 3 | folderAsset: yes 4 | timeCreated: 1501554094 5 | licenseType: Store 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/ButtonHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b17f82d01b9649b19b8264e0249e256 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/UIElementDragger.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 734684c7476be441b98af31fc4cedfcf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Editor/BL_BuildPostProcess.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 23cfd119e99b54d1f94c102f02a71d83 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/TestHome.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d29a4faa29e114882be42f949b5f8a17 3 | timeCreated: 1501586409 4 | licenseType: Store 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/TestHelloUnityVideo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8538ee3fd36341a3854872843a673d1 3 | timeCreated: 1501586544 4 | licenseType: Store 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/example.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5ef7c3e294874f80a24bc3af392e321 3 | timeCreated: 1526275871 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/ButtonClick.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4694a90d8779e430e92a143c4450274f 3 | timeCreated: 1526275871 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/UIElementDragger.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.EventSystems; 3 | 4 | namespace agora_utilities 5 | { 6 | public class UIElementDragger : EventTrigger 7 | { 8 | 9 | public override void OnDrag(PointerEventData eventData) 10 | { 11 | transform.position = new Vector2(Input.mousePosition.x, Input.mousePosition.y); 12 | base.OnDrag(eventData); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/readme.txt: -------------------------------------------------------------------------------- 1 | 2017/05/12 Fri Zhenyong Chen 2 | 3 | How to build for iOS 4 | 5 | Config Unity build settings: 6 | Select rendering API: OpenGLES2, remove metal 7 | 8 | Fix created iOS project file: 9 | Add libraries to the project: 10 | libresolv.tbd 11 | CoreTelephony.framework 12 | VideoToolbox.framework 13 | libAgoraRTCEngine.a 14 | libmediasdk.a 15 | 16 | Enable Bitcode: No 17 | 18 | Fix info.plist 19 | Add Privacy - Camera Usage Description 20 | Add Privacy - Microphone Usage Description 21 | 22 | Connect your iPhone/iPad to XCode 23 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Editor/BL_BuildPostProcess.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | <<<<<<< HEAD:Hello-Video-Unity-Agora/Assets/ButtonHandler.cs.meta 3 | guid: 5b17f82d01b9649b19b8264e0249e256 4 | ======= 5 | guid: 9776a4e9fc3c743a29a3b73d55b49311 6 | >>>>>>> 3.4.0:Hello-Video-Unity-Agora-with-Texture/Assets/Editor/BL_BuildPostProcess.cs.meta 7 | MonoImporter: 8 | externalObjects: {} 9 | serializedVersion: 2 10 | defaultReferences: [] 11 | executionOrder: 0 12 | icon: {instanceID: 0} 13 | userData: 14 | assetBundleName: 15 | assetBundleVariant: 16 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | /Native/obj/ 8 | /Native/libs/ 9 | 10 | # Autogenerated VS/MD solution and project files 11 | ExportedObj/ 12 | .consulo 13 | *.csproj 14 | *.unityproj 15 | *.sln 16 | *.suo 17 | *.tmp 18 | *.user 19 | *.userprefs 20 | *.pidb 21 | *.booproj 22 | *.svd 23 | *.pdb 24 | 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage 35 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | /Native/obj/ 8 | /Native/libs/ 9 | /UnityPackageManager/ 10 | 11 | # Autogenerated VS/MD solution and project files 12 | ExportedObj/ 13 | .consulo 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | 30 | # Unity3D Generated File On Crash Reports 31 | sysinfo.txt 32 | 33 | # Builds 34 | *.apk 35 | *.unitypackage 36 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 199ee5d12c49240d9b07835f63710920 3 | folderAsset: yes 4 | timeCreated: 1501582633 5 | licenseType: Store 6 | PluginImporter: 7 | serializedVersion: 1 8 | iconMap: {} 9 | executionOrder: {} 10 | isPreloaded: 0 11 | isOverridable: 0 12 | platformData: 13 | Android: 14 | enabled: 1 15 | settings: {} 16 | Any: 17 | enabled: 0 18 | settings: {} 19 | Editor: 20 | enabled: 0 21 | settings: 22 | DefaultValueInitialized: true 23 | userData: 24 | assetBundleName: 25 | assetBundleVariant: 26 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins/Android/AgoraRtcEngineKit.plugin/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library=true 16 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library=true 16 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/ButtonHandler.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | public class ButtonHandler : MonoBehaviour 5 | { 6 | 7 | /// 8 | /// React to a button click event. Used in the UI Button action definition. 9 | /// 10 | /// 11 | public void onButtonClicked(Button button) 12 | { 13 | // which GameObject? 14 | GameObject go = GameObject.Find("GameController"); 15 | if (go != null) 16 | { 17 | TestHome gameController = go.GetComponent(); 18 | if (gameController == null) 19 | { 20 | Debug.LogError("Missing game controller..."); 21 | return; 22 | } 23 | if (button.name == "JoinButton") 24 | { 25 | gameController.onJoinButtonClicked(); 26 | } 27 | else if (button.name == "LeaveButton") 28 | { 29 | gameController.onLeaveButtonClicked(); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2017 Agora Lab, Inc (http://www.agora.io/) 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | 10 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Plugins/Android/AgoraRtcEngineKit.plugin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Plugins/Android/AgoraRtcEngineKit.plugin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/README: -------------------------------------------------------------------------------- 1 | 2 | ####################################################################################################### 3 | # [For Unity 3D developpers] 4 | ####################################################################################################### 5 | 6 | iOS: 7 | ----------------- 8 | 1. Create a normal Unity 3D project 9 | 2. Copy AgoraRtcEngineKit.framework and libagoraSdkCWrapper.a to Assets/Plugins/iOS 10 | 3. Copy AgoraGamingRtcEngine.cs, videoSurface.cs to your Unity 3D project 11 | 4. Create a script file (like example.cs) 12 | 5. Attach videoSurface.cs to your game objects 13 | 6. Build your Unity 3D app 14 | 15 | In the generated xcode project, you need: 16 | Add VideoToolbox.frameworks, libresolv, CoreTelephony.frameworks 17 | 18 | Finally, build your xcode project 19 | 20 | 21 | Android: 22 | ----------------- 23 | 1. Create a normal Unity 3D project 24 | 2. Copy AgoraUnitySdk/Android/bin to Assets/Plugins/Android/libs 25 | 3. Remove arm64-v8a stuff 26 | 4. Copy AndroidManifest.xml (or you modify your AndroidManifest.xml to add some permissions to your app later) 27 | 5. Copy gradle/ and gradlew and gradlew.bat 28 | 6. ./gradlew assembleDebug && adb install -r ./build/outputs/apk/VideoTexture-debug.apk 29 | 30 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": 3 | { 4 | "**/.DS_Store":true, 5 | "**/.git":true, 6 | "**/.gitignore":true, 7 | "**/.gitmodules":true, 8 | "**/*.booproj":true, 9 | "**/*.pidb":true, 10 | "**/*.suo":true, 11 | "**/*.user":true, 12 | "**/*.userprefs":true, 13 | "**/*.unityproj":true, 14 | "**/*.dll":true, 15 | "**/*.exe":true, 16 | "**/*.pdf":true, 17 | "**/*.mid":true, 18 | "**/*.midi":true, 19 | "**/*.wav":true, 20 | "**/*.gif":true, 21 | "**/*.ico":true, 22 | "**/*.jpg":true, 23 | "**/*.jpeg":true, 24 | "**/*.png":true, 25 | "**/*.psd":true, 26 | "**/*.tga":true, 27 | "**/*.tif":true, 28 | "**/*.tiff":true, 29 | "**/*.3ds":true, 30 | "**/*.3DS":true, 31 | "**/*.fbx":true, 32 | "**/*.FBX":true, 33 | "**/*.lxo":true, 34 | "**/*.LXO":true, 35 | "**/*.ma":true, 36 | "**/*.MA":true, 37 | "**/*.obj":true, 38 | "**/*.OBJ":true, 39 | "**/*.asset":true, 40 | "**/*.cubemap":true, 41 | "**/*.flare":true, 42 | "**/*.mat":true, 43 | "**/*.meta":true, 44 | "**/*.prefab":true, 45 | "**/*.unity":true, 46 | "build/":true, 47 | "Build/":true, 48 | "Library/":true, 49 | "library/":true, 50 | "obj/":true, 51 | "Obj/":true, 52 | "ProjectSettings/":true, 53 | "temp/":true, 54 | "Temp/":true 55 | } 56 | } -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts/AgoraTools/signcode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ################################################################################ 3 | # Notarize Step #1 - Code signing 4 | # Required envirnmenta variable "$SIGNATURE" 5 | # possible command line: 6 | # (export SIGNATURE="my apple developer identity (xxxxx)"; ./codesign.sh MyApp.app) 7 | # To find available signatures, use 8 | # security find-identity -v -p codesigning 9 | ################################################################################ 10 | 11 | if [ "$1" == "" ] || [ $# -lt 1 ]; then 12 | echo "Please enter the app name!" 13 | exit 1 14 | fi 15 | 16 | if [ "" == "$SIGNATURE" ]; then 17 | echo "You must provide signature for codesign!" 18 | echo possible command line: 19 | echo ' (export SIGNATURE="my apple developer identity (xxxxx)";' $0 $1 ")" 20 | echo To find available signatures, running: 21 | echo ' security find-identity -v -p codesigning' 22 | security find-identity -v -p codesigning 23 | exit 2 24 | fi 25 | 26 | ENTITLEMENT="App.entitlements" 27 | APP="$1" 28 | 29 | AGORA_FRAMEWORKS="$APP/Contents/PlugIns/agoraSdkCWrapper.bundle/Contents/Resources" 30 | AGORA_CLIB="$APP/Contents/Plugins/agoraSdkCWrapper.bundle/Contents/MacOS/agoraSdkCWrapper" 31 | PROJ_BIN="$APP/Contents/MacOS" 32 | 33 | # with option the executable can't be run before notarization 34 | OPTIONS="-o runtime" 35 | 36 | if [ ! -e $ENTITLEMENT ]; then 37 | echo "$ENTITLEMENT is not found! quit..." 38 | exit 1 39 | fi 40 | 41 | function CodeSign { 42 | target="$1" 43 | echo "codesigning $target" 44 | codesign $OPTIONS -f -v --timestamp --deep -s "$SIGNATURE" --entitlements $ENTITLEMENT $target 45 | } 46 | 47 | #set -x 48 | chmod -R a+xr $APP 49 | #read $b 50 | 51 | echo "" 52 | echo "==== frameworks" 53 | for framework in $AGORA_FRAMEWORKS/*; do 54 | CodeSign $framework 55 | done 56 | 57 | echo "==== bin " 58 | for bin in $PROJ_BIN/*; do 59 | CodeSign "$bin" 60 | done 61 | 62 | CodeSign $AGORA_CLIB 63 | CodeSign $APP 64 | 65 | # verify 66 | echo "" 67 | echo "Code sign is done. next, verify..." 68 | codesign -v --strict --deep --verbose=2 $APP 69 | 70 | # after notarize 71 | # spctl --assess -vv TestMacSign.app 72 | # After this, run the build, it should still runs 73 | #set +x 74 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora-with-Texture/Assets/Editor/BL_BuildPostProcess.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Callbacks; 4 | using System.Collections; 5 | using UnityEditor.iOS.Xcode; 6 | using System.IO; 7 | 8 | public class BL_BuildPostProcess { 9 | 10 | [PostProcessBuild] 11 | public static void OnPostprocessBuild(BuildTarget buildTarget, string path) { 12 | 13 | if (buildTarget == BuildTarget.iOS) { 14 | // string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj"; 15 | // DisableBitcode(projPath); 16 | LinkLibraries (path); 17 | } 18 | } 19 | 20 | public static void DisableBitcode (string projPath) { 21 | PBXProject proj = new PBXProject(); 22 | proj.ReadFromString(File.ReadAllText(projPath)); 23 | string target = proj.TargetGuidByName("Unity-iPhone"); 24 | proj.SetBuildProperty(target, "ENABLE_BITCODE", "false"); 25 | File.WriteAllText(projPath, proj.WriteToString()); 26 | } 27 | 28 | public static void LinkLibraries (string path) { 29 | // linked library 30 | string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj"; 31 | PBXProject proj = new PBXProject(); 32 | proj.ReadFromFile(projPath); 33 | string target = proj.TargetGuidByName("Unity-iPhone"); 34 | proj.SetBuildProperty(target, "ENABLE_BITCODE", "false"); 35 | proj.AddFrameworkToProject(target, "CoreTelephony.framework", true); 36 | proj.AddFrameworkToProject(target, "VideoToolbox.framework", true); 37 | proj.AddFrameworkToProject(target, "libresolv.tbd", true); 38 | proj.AddFrameworkToProject(target, "libiPhone-lib.a", true); 39 | proj.AddFrameworkToProject(target, "CoreText.framework", true); 40 | proj.AddFrameworkToProject(target, "Metal.framework", true); 41 | proj.AddFrameworkToProject(target, "CoreML.framework", true); 42 | proj.AddFrameworkToProject(target, "Accelerate.framework", true); 43 | File.WriteAllText(projPath, proj.WriteToString()); 44 | 45 | // permission 46 | string pListPath = path + "/Info.plist"; 47 | PlistDocument plist = new PlistDocument(); 48 | plist.ReadFromString(File.ReadAllText(pListPath)); 49 | PlistElementDict rootDic = plist.root; 50 | var cameraPermission = "NSCameraUsageDescription"; 51 | var micPermission = "NSMicrophoneUsageDescription"; 52 | rootDic.SetString(cameraPermission, "Video need to use camera"); 53 | rootDic.SetString(micPermission, "Voice call need to user mic"); 54 | File.WriteAllText(pListPath, plist.WriteToString()); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/README.zh.md: -------------------------------------------------------------------------------- 1 | 2 | ## Hello Video Unity Agora 3 | ### 在Unity应用程序中运行视频聊天 4 | 5 | Read this in other languages: [English](README.md) 6 | 7 | 该演示演示了如何使用Agora IO的Video SDK配置和运行Unity应用程序。该SDK支持Unity上的iOS,Android,MacOS和Windows平台。 8 | 9 | ## 先决条件 10 | 11 | -Unity编辑器(2017年LTS或更高版本) 12 | 13 | -一个带有Agora.io的[开发者帐户](https://sso.agora.io/cn/v3/signup) 14 | 15 | 16 | ## 入门 17 | 您无需克隆该项目即可试用该演示。该演示本身捆绑在Agora Video SDK中。您可以通过以下两种方法之一下载SDK: 18 | 19 | 1. [Asset Store](https://assetstore.unity.com/packages/tools/video/agora-video-sdk-for-unity-134502): 导入软件包后,您应该在Assets / AgoraEngine / Demo下找到该演示。 20 | 2. [Agora网站下载页面](https://docs.agora.io/en/Video/downloads?platform=Unity): 您将获得一个zip文件*。解压缩后,在samples目录中打开项目。该演示位于上述位置。 21 | 22 | ***将SDK从下载的zip文件添加到项目中** 23 | 从Agora网站解压缩下载的SDK,然后将以下SDK文件夹中的文件复制到关联的Unity应用程序文件夹中。 24 | 25 | SDK Folder|Application Folder 26 | ---|--- 27 | libs/Android/|Assets/Plugins/Android/ 28 | libs/iOS/|Assets/Plugins/iOS/ 29 | libs/macOS/|Assets/Plugins/macOS/ 30 | libs/x86/|Assets/Plugins/x86/ 31 | libs/x86_64/|Assets/Plugins/x86_64/ 32 | libs/Scripts/AgoraGamingSDK/|Assets/Scripts/AgoraGamingSDK/ 33 | 34 | **如果您从Asset Store下载SDK,则无需进行上述复制** 35 | 36 | 37 | ## 添加您的AppID 38 | 39 | 在构建和运行项目之前,您需要将AppID添加到配置中。转到您的 [开发者帐户的项目控制台](https://console.agora.io/projects),创建一个新的AppId或从现有项目中复制该AppId。 40 | 41 | 请注意,对于准备投入生产的项目,务必始终使用启用了证书的AppId,这一点很重要。但是,在这个简单的快速入门演示中,我们将跳过这一部分。因此,应为测试模式创建AppId。 42 | ![enter image description here](https://user-images.githubusercontent.com/1261195/110023464-11eb0480-7ce2-11eb-99d6-031af60715ab.png) 43 | 44 | ## 运行演示 45 | 46 | 执行以下步骤: 47 | 48 | 1.打开Assets / Demo / SceneHome场景, 49 | 2.从Unity编辑器的“层次结构”面板中选择GameController。 50 | 3. GameController游戏对象具有属性App ID,您可以在其中添加Agora App ID 51 | ![enter image description here](https://user-images.githubusercontent.com/1261195/113456235-88525380-93c1-11eb-9426-f76f7882cccb.png) 52 | 4.确保已将SceneHome和SceneHelloVideo添加到构建设置中。 53 | 5.从“编辑器”中单击“运行”,或者在设备上构建并运行。 54 | 6.最佳地,您应该运行该演示的两个实例以测试视频聊天。 55 | 7.点击“加入”,您应该看到类似于此视图的下一个场景:![enter image description here](https://user-images.githubusercontent.com/1261195/113455947-c602ac80-93c0-11eb-8fb5-275ae2544387.png) 56 | 57 | 58 | ## 资源 59 | 60 | - 完整的API文档可在[文档中心](https://docs.agora.io/cn)获得 61 | - 您可以在[此处](https://github.com/AgoraIO/Hello-Video-Unity-Agora/issues) 提交有关此示例的错误。 62 | - 要查看更多示例Unity项目,请参见 https://github.com/AgoraIO/Agora-Unity-Quickstart 63 | - 由开发人员社区管理的存储库可在[Agora社区](https://github.com/AgoraIO-Community)中找到 64 | 65 | 66 | 67 | 68 | ## 代码许可 69 | 该软件受MIT许可证(MIT)约束。[查看许可](LICENSE.md). 70 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Editor/BL_BuildPostProcess.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_IPHONE || UNITY_STANDALONE_OSX 2 | 3 | using System.IO; 4 | using UnityEditor; 5 | using UnityEditor.Callbacks; 6 | #if UNITY_IPHONE 7 | using UnityEditor.iOS.Xcode; 8 | using UnityEditor.iOS.Xcode.Extensions; 9 | #endif 10 | 11 | public class BL_BuildPostProcess 12 | { 13 | 14 | [PostProcessBuild] 15 | public static void OnPostprocessBuild(BuildTarget buildTarget, string path) 16 | { 17 | if (buildTarget == BuildTarget.iOS) 18 | { 19 | #if UNITY_IPHONE 20 | LinkLibraries(path); 21 | UpdatePermission(path + "/Info.plist"); 22 | #endif 23 | } 24 | } 25 | #if UNITY_IPHONE 26 | public static void DisableBitcode(string projPath) 27 | { 28 | PBXProject proj = new PBXProject(); 29 | proj.ReadFromString(File.ReadAllText(projPath)); 30 | 31 | string target = GetTargetGuid(proj); 32 | proj.SetBuildProperty(target, "ENABLE_BITCODE", "false"); 33 | File.WriteAllText(projPath, proj.WriteToString()); 34 | } 35 | 36 | static string GetTargetGuid(PBXProject proj) 37 | { 38 | #if UNITY_2019_3_OR_NEWER 39 | return proj.GetUnityFrameworkTargetGuid(); 40 | #else 41 | return proj.TargetGuidByName("Unity-iPhone"); 42 | #endif 43 | } 44 | 45 | static void LinkLibraries(string path) 46 | { 47 | // linked library 48 | const string defaultLocationInProj = "AgoraEngine/Plugins/iOS"; 49 | string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj"; 50 | PBXProject proj = new PBXProject(); 51 | proj.ReadFromFile(projPath); 52 | string target = GetTargetGuid(proj); 53 | // embedded frameworks 54 | #if UNITY_2019_1_OR_NEWER 55 | target = proj.GetUnityMainTargetGuid(); 56 | #endif 57 | string pluginDir = path + "/Frameworks/AgoraEngine/Plugins/iOS/"; 58 | var frameworkFilePaths = Directory.GetDirectories(pluginDir, "*.framework", SearchOption.TopDirectoryOnly); 59 | foreach (string fullpath in frameworkFilePaths) 60 | { 61 | string frameworkName = Path.Combine(defaultLocationInProj, Path.GetFileName(fullpath)); 62 | string fileGuid = proj.AddFile(frameworkName, "Frameworks/" + frameworkName, PBXSourceTree.Sdk); 63 | PBXProjectExtensions.AddFileToEmbedFrameworks(proj, target, fileGuid); 64 | } 65 | proj.SetBuildProperty(target, "LD_RUNPATH_SEARCH_PATHS", "$(inherited) @executable_path/Frameworks"); 66 | 67 | // done, write to the project file 68 | File.WriteAllText(projPath, proj.WriteToString()); 69 | } 70 | 71 | #endif 72 | /// 73 | /// Update the permission 74 | /// 75 | /// path to the Info.plist file 76 | static void UpdatePermission(string pListPath) 77 | { 78 | #if UNITY_IPHONE 79 | PlistDocument plist = new PlistDocument(); 80 | plist.ReadFromString(File.ReadAllText(pListPath)); 81 | PlistElementDict rootDic = plist.root; 82 | var cameraPermission = "NSCameraUsageDescription"; 83 | var micPermission = "NSMicrophoneUsageDescription"; 84 | rootDic.SetString(cameraPermission, "Video need to use camera"); 85 | rootDic.SetString(micPermission, "Voice call need to user mic"); 86 | File.WriteAllText(pListPath, plist.WriteToString()); 87 | #endif 88 | } 89 | 90 | } 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Scripts/AgoraTools/prep_codesign.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ################################################################################ 3 | # Script: prep_codesign.sh 4 | # 5 | # Synosis: prep_codesign.sh 6 | # 7 | # Description 8 | # Use for Unity Mac build only. When an Agora Unity Project gets built, 9 | # the framework library symbolic link structure gets lost. This script will 10 | # restore the symlink structure inside the AgoraRTCKit frame work. 11 | # 12 | # For a reference to the original framework structure, you may also take 13 | # a look at the online download zipped version and look inside the bundle. 14 | # 15 | # Usage: 16 | # * Use for preparation for codesign and distribution that requires Apple 17 | # notarization. 18 | # 19 | # * Run this from the build directory where your Mac build ("YourApp.app") is. 20 | # Build the Unity Project and execute this script, for example: 21 | # ./prep_codesign.sh YourApp.app 22 | # * A entitlement file "App.entitlements" will be created. Use that for your 23 | # codesign --entitlements option. 24 | # 25 | ################################################################################ 26 | 27 | if [ "$1" == "" ] || [ $# -lt 1 ]; then 28 | echo "Please enter the app location" 29 | exit 1 30 | fi 31 | 32 | echo "--------------------------------------" 33 | echo "start restructure framework links..." 34 | echo "--------------------------------------" 35 | APP="$PWD/$1" 36 | ENTITLEMENT="App.entitlements" 37 | AGORA_FRAMEWORKS="$APP/Contents/PlugIns/agoraSdkCWrapper.bundle/Contents/Frameworks" 38 | AGORA_CLIB="$APP/Contents/Plugins/agoraSdkCWrapper.bundle/Contents/MacOS/agoraSdkCWrapper" 39 | 40 | shopt -s extglob 41 | 42 | 43 | function create_entitlement { 44 | echo "Writing entitlement to $ENTITLEMENT ..." 45 | 46 | echo " 47 | 48 | 49 | 50 | 51 | com.apple.security.cs.allow-unsigned-executable-memory 52 | 53 | com.apple.security.device.audio-input 54 | 55 | com.apple.security.device.camera 56 | 57 | com.apple.security.network.client 58 | 59 | com.apple.security.network.server 60 | 61 | 62 | 63 | " > $ENTITLEMENT 64 | } 65 | 66 | function relink { 67 | # remove everything except versions 68 | echo "removing duplicate framework files... in $PWD" 69 | rm -rf !(Versions) 70 | rm -rf Versions/Current* 71 | 72 | cd Versions 73 | ln -s A Current 74 | cd .. 75 | 76 | for filename in Versions/Current/*; do 77 | if [ ${filename: -5} != ".meta" ]; then 78 | echo "linking $filename" 79 | ln -s $filename . 80 | fi 81 | done 82 | } 83 | 84 | function signhelp { 85 | 86 | echo "" 87 | echo "Make sure you code sign the following items in addition to the App itself:" 88 | echo " $AGORA_CLIB" 89 | for framework in "$AGORA_FRAMEWORKS/*"; do 90 | echo " $framework" 91 | done 92 | echo "Or use the signcode.sh script to help your code-signing" 93 | } 94 | 95 | # remove all meta files 96 | find "$APP" -type f -name "*.meta" -delete 97 | 98 | # re-estasbish version symlinks inside the frameworks 99 | for framework in $AGORA_FRAMEWORKS/*; do 100 | (cd $framework && relink) 2>/dev/null 101 | done 102 | 103 | create_entitlement 104 | 105 | echo "--------------------------------------" 106 | echo "done." 107 | signhelp 108 | echo "--------------------------------------" 109 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/TestHome.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine.SceneManagement; 2 | using UnityEngine.UI; 3 | using UnityEngine; 4 | #if(UNITY_2018_3_OR_NEWER && UNITY_ANDROID) 5 | using UnityEngine.Android; 6 | #endif 7 | using System.Collections; 8 | 9 | /// 10 | /// TestHome serves a game controller object for this application. 11 | /// 12 | public class TestHome : MonoBehaviour 13 | { 14 | 15 | // Use this for initialization 16 | #if (UNITY_2018_3_OR_NEWER && UNITY_ANDROID) 17 | private ArrayList permissionList = new ArrayList(); 18 | #endif 19 | static TestHelloUnityVideo app = null; 20 | 21 | private string HomeSceneName = "SceneHome"; 22 | 23 | private string PlaySceneName = "SceneHelloVideo"; 24 | 25 | // PLEASE KEEP THIS App ID IN SAFE PLACE 26 | // Get your own App ID at https://dashboard.agora.io/ 27 | [SerializeField] 28 | private string AppID = "your_appid"; 29 | 30 | void Awake() 31 | { 32 | #if (UNITY_2018_3_OR_NEWER && UNITY_ANDROID) 33 | permissionList.Add(Permission.Microphone); 34 | permissionList.Add(Permission.Camera); 35 | #endif 36 | 37 | // keep this alive across scenes 38 | DontDestroyOnLoad(this.gameObject); 39 | } 40 | 41 | void Start() 42 | { 43 | CheckAppId(); 44 | } 45 | 46 | void Update() 47 | { 48 | CheckPermissions(); 49 | } 50 | 51 | private void CheckAppId() 52 | { 53 | Debug.Assert(AppID.Length > 10, "Please fill in your AppId first on Game Controller object."); 54 | GameObject go = GameObject.Find("AppIDText"); 55 | if (go != null) 56 | { 57 | Text appIDText = go.GetComponent(); 58 | if (appIDText != null) 59 | { 60 | if (string.IsNullOrEmpty(AppID)) 61 | { 62 | appIDText.text = "AppID: " + "UNDEFINED!"; 63 | } 64 | else 65 | { 66 | appIDText.text = "AppID: " + AppID.Substring(0, 4) + "********" + AppID.Substring(AppID.Length - 4, 4); 67 | } 68 | } 69 | } 70 | } 71 | 72 | /// 73 | /// Checks for platform dependent permissions. 74 | /// 75 | private void CheckPermissions() 76 | { 77 | #if (UNITY_2018_3_OR_NEWER && UNITY_ANDROID) 78 | foreach(string permission in permissionList) 79 | { 80 | if (!Permission.HasUserAuthorizedPermission(permission)) 81 | { 82 | Permission.RequestUserPermission(permission); 83 | } 84 | } 85 | #endif 86 | } 87 | 88 | public void onJoinButtonClicked() 89 | { 90 | // get parameters (channel name, channel profile, etc.) 91 | GameObject go = GameObject.Find("ChannelName"); 92 | InputField field = go.GetComponent(); 93 | 94 | // create app if nonexistent 95 | if (ReferenceEquals(app, null)) 96 | { 97 | app = new TestHelloUnityVideo(); // create app 98 | app.loadEngine(AppID); // load engine 99 | } 100 | 101 | // join channel and jump to next scene 102 | app.join(field.text); 103 | SceneManager.sceneLoaded += OnLevelFinishedLoading; // configure GameObject after scene is loaded 104 | SceneManager.LoadScene(PlaySceneName, LoadSceneMode.Single); 105 | } 106 | 107 | public void onLeaveButtonClicked() 108 | { 109 | if (!ReferenceEquals(app, null)) 110 | { 111 | app.leave(); // leave channel 112 | app.unloadEngine(); // delete engine 113 | app = null; // delete app 114 | SceneManager.LoadScene(HomeSceneName, LoadSceneMode.Single); 115 | } 116 | Destroy(gameObject); 117 | } 118 | 119 | public void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode) 120 | { 121 | if (scene.name == PlaySceneName) 122 | { 123 | if (!ReferenceEquals(app, null)) 124 | { 125 | app.onSceneHelloVideoLoaded(); // call this after scene is loaded 126 | } 127 | SceneManager.sceneLoaded -= OnLevelFinishedLoading; 128 | } 129 | } 130 | 131 | void OnApplicationPause(bool paused) 132 | { 133 | if (!ReferenceEquals(app, null)) 134 | { 135 | app.EnableVideo(paused); 136 | } 137 | } 138 | 139 | void OnApplicationQuit() 140 | { 141 | if (!ReferenceEquals(app, null)) 142 | { 143 | app.unloadEngine(); 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/README.md: -------------------------------------------------------------------------------- 1 | ## Hello Video Agora for Unity 2 | 3 | **Run Video Chat within Your Unity Application** 4 | 5 | (Other languages:[中文](README.zh.md)) 6 | 7 | 8 | 9 | ## Prerequisites 10 | 11 | 12 | 13 | - Unity Editor (2017 LTS or above) 14 | 15 | - A [developer account]([https://sso.agora.io/en/signup](https://sso.agora.io/en/signup)) with Agora.io 16 | 17 | 18 | 19 | ## Getting Started 20 | 21 | You do not need to clone this project in order to try out the demo. The demo itself is bundled in the Agora Video SDK. You may download the SDK via one of the follow two methods: 22 | 23 | 24 | 25 | 1. [Asset Store]([https://assetstore.unity.com/packages/tools/video/agora-video-sdk-for-unity-134502](https://assetstore.unity.com/packages/tools/video/agora-video-sdk-for-unity-134502)). After import the package, you should find the demo under Assets/AgoraEngine/Demo. 26 | 27 | 2. [Agora Website Download Page.]([https://docs.agora.io/en/Video/downloads?platform=Unity](https://docs.agora.io/en/Video/downloads?platform=Unity)) You will obtain a zip file. After unzipping, open the project in samples directory. The Demo is in the location mentioned above. 28 | 29 | 30 | 31 | **To add the SDK from the downloaded zip file to a project** 32 | 33 | Unzip the downloaded SDK from Agora website and copy the files from the following SDK folders into the associated Unity application folders. 34 | 35 | SDK Folder|Application Folder| 36 | ---|--- 37 | |libs/Android/|Assets/Plugins/Android/| 38 | |libs/iOS/|Assets/Plugins/iOS/| 39 | |libs/macOS/|Assets/Plugins/macOS/ 40 | |libs/x86/|Assets/Plugins/x86/ 41 | |libs/x86_64/|Assets/Plugins/x86_64/ 42 | |libs/Scripts/AgoraGamingSDK/|Assets/Scripts/AgoraGamingSDK/ 43 | 44 | 45 | 46 | ***If you download the SDK from Asset Store, then there is no need to do the copying*** 47 | 48 | 49 | 50 | ### Add Your AppID 51 | 52 | 53 | 54 | Before you can build and run the project, you will need to add your AppID to the configuration. Go to your [developer account’s project console]([https://console.agora.io/projects](https://console.agora.io/projects)), create a new AppId or copy the AppId from an existing project. 55 | 56 | 57 | 58 | Note it is important that for a production ready project, you should always use an AppId with certificate enabled. However, in this simple quick start demo, we will skip this part. So you AppId should be created for testing mode. 59 | ![enter image description here](https://user-images.githubusercontent.com/1261195/110023464-11eb0480-7ce2-11eb-99d6-031af60715ab.png) 60 | 61 | ### Running the Demo 62 | 63 | Perform the following steps: 64 | 65 | 66 | 1. Open the Assets/Demo/SceneHome scene, 67 | 68 | 2. Select the GameController from the Unity Editor’s Hierarchy panel. 69 | 70 | 3. The GameController game object has a property App ID, this is where you will add your Agora App ID. 71 | 72 | ![enter image description here](https://user-images.githubusercontent.com/1261195/113456235-88525380-93c1-11eb-9426-f76f7882cccb.png) 73 | 4. Make sure you added SceneHome and SceneHelloVideo to your build settings. 74 | 5. Hit run from the Editor or build and run on a device. 75 | 6. Optimally you should run two instances of the demo in order to test video chat. 76 | 7. Tap "Join" and you should see the next scene similar to this view: 77 | ![Screen Shot 2022-04-28 at 1 47 19 PM](https://user-images.githubusercontent.com/1261195/165843046-1f152c0f-73ac-4a4f-aecc-109d52ee4940.png) 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | ## Some Trouble Shooting FAQs 86 | 87 | (Please also read the README file in the SDK..) 88 | 89 | **Q:** There are only white cube and box on the demo screen after I join the channel. 90 | 91 | **A:** There may be definite reasons for this. First recommendation is implementing the OnError and OnWarning callbacks to check on what errors are occuring. (Added in the Demo starting from v3.2.1.71). Here are the common causes: 92 | 93 | 94 | 95 | 1. You registered an AppId with Certificate enabled, but you didn’t include a secure token in your JoinChannel call. => **You should use an AppId without Certificate if you are new to the SDK.** Create a new AppId with Certificate after you tested the POC and feel comfortable to enforce token security. 96 | 97 | 98 | 99 | 2. The Application did not acquire the required OS level permission for Camera. => **Make sure you set those up in the PlayerSettings and Manifest if for Android.** 100 | 101 | 102 | 103 | 3. The agoraCWrapper library didn’t get loaded on run-time (usually happens on Standalone, not Editor). Make sure you have the correct Platform Settings flag selected, we recommend you to select **AnyCPU**. See examples in MacOS section for building the App above. 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | **Q:** I press the join button but the scene doesn't change (usually happens on Editor). 112 | 113 | **A:** Make sure you have chosen both two scenes in Build Settings. 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | **Q:** When run the app, a pop-up window said agoraSdkCWrapper.bundle cannot be opened because the developer cannot be verified.(usually happens on MacOS). 122 | 123 | **A:** Choose "allow" in Settings/security and privacy, rerun the app. 124 | 125 | 126 | 127 | ## Resources 128 | 129 | 130 | 131 | - Complete API documentation is available at the [Document Center]([https://docs.agora.io/en/](https://docs.agora.io/en/)). 132 | 133 | - You can file bugs about this sample [here]([https://github.com/AgoraIO/Hello-Video-Unity-Agora/issues](https://github.com/AgoraIO/Hello-Video-Unity-Agora/issues)). 134 | 135 | 136 | 137 | - For potential SDK issues, take a look at our [FAQ]([https://docs.agora.io/en/faq](https://docs.agora.io/en/faq)) first 138 | 139 | 140 | 141 | - To see more sample Unity projects, see https://github.com/AgoraIO/Agora-Unity-Quickstart 142 | 143 | 144 | 145 | - Repositories managed by developer communities can be found at [Agora Community]([https://github.com/AgoraIO-Community](https://github.com/AgoraIO-Community)) 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | ## License 156 | 157 | 158 | 159 | This software is under the MIT License (MIT). [View the license](LICENSE.md). -------------------------------------------------------------------------------- /Hello-Video-Unity-Agora/Assets/AgoraEngine/Demo/TestHelloUnityVideo.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | using agora_gaming_rtc; 5 | using agora_utilities; 6 | 7 | 8 | // this is an example of using Agora Unity SDK 9 | // It demonstrates: 10 | // How to enable video 11 | // How to join/leave channel 12 | // 13 | public class TestHelloUnityVideo 14 | { 15 | 16 | // instance of agora engine 17 | private IRtcEngine mRtcEngine; 18 | private Text MessageText; 19 | 20 | // a token is a channel key that works with a AppID that requires it. 21 | // Generate one by your token server or get a temporary token from the developer console 22 | private string token = ""; 23 | 24 | // load agora engine 25 | public void loadEngine(string appId) 26 | { 27 | // start sdk 28 | Debug.Log("initializeEngine"); 29 | 30 | if (mRtcEngine != null) 31 | { 32 | Debug.Log("Engine exists. Please unload it first!"); 33 | return; 34 | } 35 | 36 | // init engine 37 | mRtcEngine = IRtcEngine.GetEngine(appId); 38 | 39 | // enable log 40 | mRtcEngine.SetLogFilter(LOG_FILTER.DEBUG | LOG_FILTER.INFO | LOG_FILTER.WARNING | LOG_FILTER.ERROR | LOG_FILTER.CRITICAL); 41 | } 42 | 43 | public void join(string channel) 44 | { 45 | Debug.Log("calling join (channel = " + channel + ")"); 46 | 47 | if (mRtcEngine == null) 48 | return; 49 | 50 | // set callbacks (optional) 51 | mRtcEngine.OnJoinChannelSuccess = onJoinChannelSuccess; 52 | mRtcEngine.OnUserJoined = onUserJoined; 53 | mRtcEngine.OnUserOffline = onUserOffline; 54 | mRtcEngine.OnWarning = (int warn, string msg) => 55 | { 56 | Debug.LogWarningFormat("Warning code:{0} msg:{1}", warn, IRtcEngine.GetErrorDescription(warn)); 57 | }; 58 | mRtcEngine.OnError = HandleError; 59 | 60 | // enable video 61 | mRtcEngine.EnableVideo(); 62 | // allow camera output callback 63 | mRtcEngine.EnableVideoObserver(); 64 | 65 | // join channel 66 | /* This API Assumes the use of a test-mode AppID 67 | mRtcEngine.JoinChannel(channel, null, 0); 68 | */ 69 | 70 | /* This API Accepts AppID with token; by default omiting info and use 0 as the local user id */ 71 | mRtcEngine.JoinChannelByKey(channelKey: token, channelName: channel); 72 | } 73 | 74 | public string getSdkVersion() 75 | { 76 | string ver = IRtcEngine.GetSdkVersion(); 77 | return ver; 78 | } 79 | 80 | public void leave() 81 | { 82 | Debug.Log("calling leave"); 83 | 84 | if (mRtcEngine == null) 85 | return; 86 | 87 | // leave channel 88 | mRtcEngine.LeaveChannel(); 89 | // deregister video frame observers in native-c code 90 | mRtcEngine.DisableVideoObserver(); 91 | } 92 | 93 | // unload agora engine 94 | public void unloadEngine() 95 | { 96 | Debug.Log("calling unloadEngine"); 97 | 98 | // delete 99 | if (mRtcEngine != null) 100 | { 101 | IRtcEngine.Destroy(); // Place this call in ApplicationQuit 102 | mRtcEngine = null; 103 | } 104 | } 105 | 106 | public void EnableVideo(bool pauseVideo) 107 | { 108 | if (mRtcEngine != null) 109 | { 110 | if (!pauseVideo) 111 | { 112 | mRtcEngine.EnableVideo(); 113 | } 114 | else 115 | { 116 | mRtcEngine.DisableVideo(); 117 | } 118 | } 119 | } 120 | 121 | // accessing GameObject in Scnene1 122 | // set video transform delegate for statically created GameObject 123 | public void onSceneHelloVideoLoaded() 124 | { 125 | // Attach the SDK Script VideoSurface for video rendering 126 | GameObject quad = GameObject.Find("Quad"); 127 | if (ReferenceEquals(quad, null)) 128 | { 129 | Debug.Log("failed to find Quad"); 130 | return; 131 | } 132 | else 133 | { 134 | quad.AddComponent(); 135 | } 136 | 137 | GameObject cube = GameObject.Find("Cube"); 138 | if (ReferenceEquals(cube, null)) 139 | { 140 | Debug.Log("failed to find Cube"); 141 | return; 142 | } 143 | else 144 | { 145 | cube.AddComponent(); 146 | } 147 | 148 | GameObject text = GameObject.Find("MessageText"); 149 | if (!ReferenceEquals(text, null)) 150 | { 151 | MessageText = text.GetComponent(); 152 | } 153 | 154 | GameObject bobj = GameObject.Find("HelpButton"); 155 | if (bobj != null) 156 | { 157 | Button button = bobj.GetComponent