Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.utilities.rest 2.4.4 #60

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
com.utilities.rest 2.4.4
- updated com.utilities.extensions -> 1.1.14
- updated docs
- updated workflow
  • Loading branch information
StephenHodgson committed Dec 30, 2023
commit 19d19aa01bcc956cc3165a40ca4f5d458c662ae6
11 changes: 2 additions & 9 deletions .github/workflows/upm-subtree-split.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,12 @@ on:
push:
branches:
- main

jobs:
upm-subtree-split:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: upm subtree split
run: |
$packageDir = Get-Item -Path "**/Packages/com.*" | Select-Object -ExpandProperty FullName
$packageDir = $packageDir.replace('${{ github.workspace }}/','')
Write-Host $packageDir
git subtree split --prefix="$packageDir" -b upm
git push -u origin upm --force
working-directory: ${{ github.workspace }}
shell: pwsh
- uses: RageAgainstThePixel/upm-subtree-split@v1
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ var audioClip = await Rest.DownloadAudioClipAsync("www.your.api/your_file.ogg",

if (audioClip != null)
{
// assign it to your audio source
audioSource.clip = audioClip;
// assign it to your audio source
audioSource.clip = audioClip;
audioSource.PlayOneShot(audioClip);
}
```
Expand All @@ -208,9 +208,10 @@ Streams an audio file from disk or remote resource as soon as enough data has be

> Unsure if this is working correctly as Unity doesn't seem to respect streaming when setting [`DownloadHandlerAudioClip.streamAudio`](https://docs.unity3d.com/ScriptReference/Networking.DownloadHandlerAudioClip-streamAudio.html) to true.
> Seems to work better for local files on disk than remote resources.
> Seems to only work for mp3 files.

```csharp
var audioClip = await Rest.StreamAudioAsync("local/path/to/your_file.ogg", AudioType.OGGVORBIS, onStreamPlaybackReady =>
var audioClip = await Rest.StreamAudioAsync("local/path/to/your_file.mp3", AudioType.MPEG, onStreamPlaybackReady =>
{
audioSource.PlayOneShot(onStreamPlaybackReady);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ var audioClip = await Rest.DownloadAudioClipAsync("www.your.api/your_file.ogg",

if (audioClip != null)
{
// assign it to your audio source
audioSource.clip = audioClip;
// assign it to your audio source
audioSource.clip = audioClip;
audioSource.PlayOneShot(audioClip);
}
```
Expand All @@ -208,9 +208,10 @@ Streams an audio file from disk or remote resource as soon as enough data has be

> Unsure if this is working correctly as Unity doesn't seem to respect streaming when setting [`DownloadHandlerAudioClip.streamAudio`](https://docs.unity3d.com/ScriptReference/Networking.DownloadHandlerAudioClip-streamAudio.html) to true.
> Seems to work better for local files on disk than remote resources.
> Seems to only work for mp3 files.

```csharp
var audioClip = await Rest.StreamAudioAsync("local/path/to/your_file.ogg", AudioType.OGGVORBIS, onStreamPlaybackReady =>
var audioClip = await Rest.StreamAudioAsync("local/path/to/your_file.mp3", AudioType.MPEG, onStreamPlaybackReady =>
{
audioSource.PlayOneShot(onStreamPlaybackReady);
});
Expand Down
4 changes: 2 additions & 2 deletions Utilities.Rest/Packages/com.utilities.rest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Utilities.Rest",
"description": "This package contains useful RESTful utilities for the Unity Game Engine.",
"keywords": [],
"version": "2.4.3",
"version": "2.4.4",
"unity": "2021.3",
"documentationUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest#documentation",
"changelogUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest/releases",
Expand All @@ -16,7 +16,7 @@
"url": "https://github.com/StephenHodgson",
"dependencies": {
"com.utilities.async": "2.1.1",
"com.utilities.extensions": "1.1.13",
"com.utilities.extensions": "1.1.14",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
Expand Down