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

Support animation #27

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into support_animation
  • Loading branch information
faidra committed May 22, 2023
commit f3d42ec7ddf537be558db28c45073d47407c47ed
2 changes: 1 addition & 1 deletion Assets/VGltfExamples/VRMExample/Scripts/VRMLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ async UniTaskVoid UIOnExportButtonClickedAsync()
var filePath = outputFilePathInput.text;
await Task.Run(() =>
{
using (var fs = new FileStream(filePath, FileMode.Create))
using (var fs = new FileStream(filePath, FileMode.Create, FileAccess.Write))
{
GltfContainer.ToGlb(fs, gltfContainer);
}
Expand Down
5 changes: 5 additions & 0 deletions Packages/net.yutopp.vgltf.unity/Runtime/Importer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ public async Task<IImporterContext> ImportSceneNodes(GameObject parentGo, Cancel
return TakeContext();
}

public Task<IImporterContext> ImportSceneNodes(CancellationToken ct = default)
{
return ImportSceneNodes(null, ct);
}

public async Task<IImporterContext> ImportEmpty(CancellationToken ct)
{
foreach (var hook in Hooks)
Expand Down
17 changes: 13 additions & 4 deletions Packages/net.yutopp.vgltf.unity/Runtime/IndexedResourceDict.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ namespace VGltf.Unity
{
public sealed class IndexedResourceDict<K, V> : IDisposable where V : UnityEngine.Object
{
readonly IndexedDisposableResourceDict<K, Utils.DestroyOnDispose<V>> _internal =
new IndexedDisposableResourceDict<K, Utils.DestroyOnDispose<V>>();
readonly IndexedDisposableResourceDict<K, Utils.DestroyOnDispose<V>> _internal;

public IndexedResourceDict(IEqualityComparer<K> equalityComparer = default)
{
_internal = new IndexedDisposableResourceDict<K, Utils.DestroyOnDispose<V>>(equalityComparer);
}

public IndexedResource<V> Add(K k, int index, string name, V v)
{
Expand Down Expand Up @@ -98,8 +102,13 @@ static IndexedResource<V> Unwrap(IndexedResource<Utils.DestroyOnDispose<V>> wres

public sealed class IndexedDisposableResourceDict<K, V> : IDisposable where V : IDisposable
{
readonly Dictionary<K, IndexedResource<V>> _dict = new Dictionary<K, IndexedResource<V>>();
readonly Dictionary<string, IndexedResource<V>> _nameDict = new Dictionary<string, IndexedResource<V>>();
readonly Dictionary<K, IndexedResource<V>> _dict;
readonly MultiMap<string, IndexedResource<V>> _nameDict = new MultiMap<string, IndexedResource<V>>();

public IndexedDisposableResourceDict(IEqualityComparer<K> equalityComparer = default)
{
_dict = new Dictionary<K, IndexedResource<V>>(equalityComparer);
}

public IndexedResource<V> Add(K k, int index, string name, V v)
{
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.