蓝色星空 483de5c01d 无脚本预制体保存 | 1 year ago | |
---|---|---|
.. | ||
AppIdInput | 1 year ago | |
Editor | 1 year ago | |
Image | 1 year ago | |
Prefab | 1 year ago | |
Tools | 1 year ago | |
AppIdInput.meta | 1 year ago | |
Editor.meta | 1 year ago | |
Home.cs | 1 year ago | |
Home.cs.meta | 1 year ago | |
HomeScene.unity | 1 year ago | |
HomeScene.unity.meta | 1 year ago | |
Image.meta | 1 year ago | |
Prefab.meta | 1 year ago | |
README.md | 1 year ago | |
README.md.meta | 1 year ago | |
README.zh.md | 1 year ago | |
README.zh.md.meta | 1 year ago | |
Tools.meta | 1 year ago |
其他语言版本: 简体中文
The API-Example-Unity project is an open-source demo that will show you different scenes on how to integrate Agora SDK APIs into your project.
Any scene of this project can run successfully alone.
Demo | Description | APIs |
---|---|---|
JoinChannelAudio | basic demo to show audio call | CreateAgoraRtcEngine, JoinChannel, LeaveChannel |
JoinChannelVideo | video demo with role selection in Editor Inspector | SetChannelProfile,SetClientRole,EnableVideo,EnableVideo, JoinChannel, VideoSurface |
Demo | Description | APIs |
---|---|---|
AudioMixing | audioMixing and play audio effect in the channel | StartAudioMixing, PlayEffect |
AudioSpectrum | audio spectrum | IAudioSpectrumObserver, RegisterMediaPlayerAudioSpectrumObserver |
ChannelMediaRelay | start cross channel media streaming forwarding. This method can be used to realize cross channel wheat connection and other scenes. | StartChannelMediaRelay, UpdateChannelMediaRelay, PauseAllChannelMediaRelay, ResumeAllChannelMediaRelay, StopChannelMediaRelay |
ContentInspect | content inspect | SetContentInspect |
CustomCaptureAudio | Sending raw data from AudioSource into the Agora channel | PushAudioFrame |
CustomCaptureVideo | Sending raw data from VideoSource into the Agora channel | PushVideoFrame |
CustomRenderAudio | use AudioSource to play raw data received in the Agora channel | PullAudioFrame |
DeviceManager | show how to get and set Device on the desktop platforms | GetAudioDeviceManager, GetVideoDeviceManager |
DualCamera | show how to use dual camera to capture data | StartPrimaryCameraCapture, StartSecondaryCameraCapture |
JoinChannelVideoToken | demo on how to run Agora app with a token | RenewToken |
JoinChannelWithUserAccount | demo on how to join channel with user account | JoinChannelWithUserAccount, GetUserInfoByUserAccount |
MediaPlayer | how to play media | CreateMediaPlayer, Play, Stop |
MediaRecorder | Media recording | StartRecording, StopRecording, |
Metadata | send meta data | IMetadataObserver |
ProcessAudioRawData | process raw Audio data in rtc engine and play with audioclip | RegisterAudioFrameObserver, OnPlaybackAudioFrame, OnRceordAudioFrame |
ProcessVideoRawData | process raw Video data in rtc engine and render with texture | RegisterVideoFrameObserver, OnCaptureVideoFrame, OnRenderVideoFrame |
PushEncodedVideoImage | push encoded data in rtc engine | PushEncodedVideoImage |
ScreenShare | sharing screen view with rtc engine | StartScreenCaptureByWindowId, StartScreenCaptureByDisplayId |
ScreenShareWhileVideoCall | sharing screen view while with a video call | StartScreenCaptureByWindowId, StartScreenCaptureByDisplayId |
SetBeautyEffectOptions | Turn on beauty during video call | SetBeautyEffectOptions |
SetEncryption | sending video with encryption | EnableEncryption |
SetVideoEncoderConfiguration | video demo with multiple encoding dimension choice | SetVideoEncoderConfiguration |
SpatialAudioWithMediaPlayer | play media with spatial audio | GetLocalSpatialAudioEngine, UpdateRemotePositionEx |
StartLocalVideoTranscoder | Merging of multiple video sources, options are jpg,png,gif,medai,etc | StartLocalVideoTranscoder |
StartDirectCdnStreaming | stream video by RTMP Push to a CDN | StartDirectCdnStreaming, SetDirectCdnStreamingVideoConfiguration, StopDirectCdnStreaming |
StartRhythmPlayer | use phythm player in rtc engine | StartRhythmPlayer |
StartRtmpStreamWithTranscoding | stream video by RTMP Push to a CDN | StartRtmpStreamWithTranscoding, UpdateRtmpTranscoding, StopRtmpStream |
StreamMessage | how to send stream message | CreateDataStream, SendStreamMessage |
TakeSnapshot | how to screen shot | TakeSnapshot |
VirtualBackground | enable virtual background | EnableVirtualBackground |
VoiceChanger | how to modify your voice | SetVoiceBeautifierPreset, SetAudioEffectPreset,SetVoiceConversionPreset,SetLocalVoicePitch, SetLocalVoiceEqualization, SetLocalVoiceReverb |
First, create a developer account at Agora.io, and obtain an App ID.
Then do the following:
Clone this repository.
Open the project in Unity Editor. Note that you will see compiler errors before you download the SDK package.
You may download the SDK package in either of the following two ways:
a. From Unity Asset Store download and import the Agora Video SDK
b. Download the ***Agora Video SDK*** from Agora.io SDK. Unzip the downloaded SDK package and import into Unity project
Fill your App ID into the ***API-Example-Unity/Assets/API-Example/appIdInput/AppIdInput.asset***
Choose one of the scene that you want to run
Run the game and you are now good to go!
If you have any problems or suggestions regarding the sample projects, feel free to file an issue.
The sample projects are under the MIT license.