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

[1.0] FirstPerson 初期化を整理 #1206

Merged
merged 11 commits into from
Sep 9, 2021

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Sep 9, 2021

  • async にした
  • 初期状態を非表示にした
  • 生成されたRenderer を RuntimeGltfInstance に移譲することにした(ShowMeshes, Destroy の責務)
  • VRM10FirstPersonSample サンプルを追加

#1194

@ousttrue ousttrue added this to the v0.83 milestone Sep 9, 2021
var count = ExcludeTriangles(indices, mesh.boneWeights, eraseBoneIndices);
var dst = new int[count];
Array.Copy(indices, 0, dst, 0, count);
var dst = await awaitCaller.Run(() => GetExcludedIndices(src.GetIndices(i), mesh.boneWeights, eraseBoneIndices));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

祝 Run

public static Mesh CreateErasedMesh(Mesh src, int[] eraseBoneIndices)
{
var task = CreateErasedMeshAsync(src, eraseBoneIndices, new ImmediateCaller());
task.Wait();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ライブラリ内の ImmediateCaller を使っているから Wait しても大丈夫

/// <param name="visible"></param>
/// <param name="awaitCaller"></param>
/// <returns></returns>
public async Task<List<SkinnedMeshRenderer>> SetupAsync(GameObject go, IAwaitCaller awaitCaller = null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レイヤー設定、引数で渡せるようにした方がよさそう。
public static int を内部で参照するのはちょっとわかりづらい

Copy link
Contributor

@Santarh Santarh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よさそう

@ousttrue ousttrue merged commit 64af0d2 into vrm-c:master Sep 9, 2021
@ousttrue ousttrue deleted the fix/first_person_setup_async branch October 27, 2021 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants