-
-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: remove ResourceManager base class (#1210)
* feat!: implement ResourceUtil * add IResourceManager and remove ResourceManager base class * test: enable ignored tests since we can init ResourceManager twice now
- Loading branch information
Showing
12 changed files
with
261 additions
and
219 deletions.
There are no files selected for viewing
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
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
26 changes: 26 additions & 0 deletions
26
Packages/com.github.homuler.mediapipe/Runtime/Scripts/Unity/ResourceManager.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (c) 2021 homuler | ||
// | ||
// Use of this source code is governed by an MIT-style | ||
// license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
using System.Collections; | ||
|
||
namespace Mediapipe.Unity | ||
{ | ||
public interface IResourceManager | ||
{ | ||
/// <summary> | ||
/// Saves <paramref name="name" /> as <paramref name="uniqueKey" /> asynchronously. | ||
/// </summary> | ||
/// <remarks> | ||
/// To make it possible for MediaPipe to read the saved asset, the asset path must be registered | ||
/// by calling <see cref="ResourceUtil.AddAssetPath" /> or <see cref="ResourceUtil.SetAssetPath"/> internally. | ||
/// </remarks> | ||
/// <param name="overwrite"> | ||
/// Specifies whether <paramref name="uniqueKey" /> will be overwritten if it already exists. | ||
/// </param> | ||
public IEnumerator PrepareAssetAsync(string name, string uniqueKey, bool overwrite = true); | ||
|
||
public IEnumerator PrepareAssetAsync(string name, bool overwrite = true) => PrepareAssetAsync(name, name, overwrite); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...time/Scripts/Util/ResourceManager.cs.meta → ...ime/Scripts/Unity/ResourceManager.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
121 changes: 0 additions & 121 deletions
121
Packages/com.github.homuler.mediapipe/Runtime/Scripts/Util/ResourceManager.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.