Skip to content

Commit

Permalink
VRChat SDK 2019.09.18.12.05 に対応(2019.08.23.13.45含む以前のバージョンとは互換性がなくなった)
Browse files Browse the repository at this point in the history
以下で報告の修正内容をマージ。

🗾あきら☎︎@VMC0.34さんのツイート: “.@esperecyan いつもお世話になってます。プルリクすべきなんですがとりあえずご報告です。VRCSDK側の更新で、アバターパフォーマンス測るCalcuratePerformanceStatsの使い方が変わったのでVRM Converter for VRChat側がエラーになってます。画像な感じの修正でエラー消えました。よろしくお願いします… https://t.co/r7bmLZc6EM”
https://twitter.com/sh_akira/status/1174732563539099648
  • Loading branch information
esperecyan committed Sep 19, 2019
1 parent 0b86ba5 commit 489a3e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Editor/ComponentsReplacer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,11 @@ ComponentsReplacer.SwayingParametersConverter swayingParametersConverter
private static IEnumerable<Converter.Message> GetMessagesAboutDynamicBoneLimits(GameObject avatar)
{
var messages = new List<Converter.Message>();
AvatarPerformanceStats statistics = AvatarPerformance.CalculatePerformanceStats(
AvatarPerformanceStats statistics = new AvatarPerformanceStats();
AvatarPerformance.CalculatePerformanceStats(
avatarName: avatar.GetComponent<VRMMeta>().Meta.Title,
avatarObject: avatar
avatarObject: avatar,
perfStats: statistics
);

AvatarPerformanceStatsLevel mediumPerformanceStatLimits
Expand Down
12 changes: 8 additions & 4 deletions Editor/Wizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,10 +509,13 @@ IEnumerable<string> notCombineRendererObjectNames
return true;
}

int currentPolycount = AvatarPerformance.CalculatePerformanceStats(
AvatarPerformanceStats statistics = new AvatarPerformanceStats();
AvatarPerformance.CalculatePerformanceStats(
avatarName: avatar.GetComponent<VRMMeta>().Meta.Title,
avatarObject: this.avatar.gameObject
).polyCount;
avatarObject: this.avatar.gameObject,
perfStats: statistics
);
int currentPolycount = statistics.polyCount;

int maxPolycount = VRChatUtility.AvatarPerformanceStatsLevelSets["Quest"].medium.polyCount;

Expand All @@ -539,7 +542,8 @@ IEnumerable<string> notCombineRendererObjectNames
{
var messages = new List<Converter.Message>();

AvatarPerformanceStats statistics = AvatarPerformance.CalculatePerformanceStats("", prefab);
AvatarPerformanceStats statistics = new AvatarPerformanceStats();
AvatarPerformance.CalculatePerformanceStats("", prefab, statistics);

AvatarPerformanceStatsLevel performanceStatLimits
= VRChatUtility.AvatarPerformanceStatsLevelSets["Quest"].medium;
Expand Down

0 comments on commit 489a3e2

Please sign in to comment.