mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-04 13:45:04 +08:00
Workaround a unity bug resulting in broken AV3 debug displays
Thanks to @TCL987 for a hint as to where to start looking!
This commit is contained in:
parent
ecf62d7c8e
commit
3486adbca2
@ -27,7 +27,9 @@ using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Avatars.Components;
|
||||
using VRC.SDK3.Editor;
|
||||
using VRC.SDKBase.Editor.BuildPipeline;
|
||||
using VRC.SDKBase.Validation.Performance.Stats;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace net.fushizen.modular_avatar.core.editor
|
||||
@ -122,6 +124,15 @@ namespace net.fushizen.modular_avatar.core.editor
|
||||
{
|
||||
UnityEngine.Object.DestroyImmediate(component);
|
||||
}
|
||||
|
||||
// The VRCSDK captures some debug information about animators as part of the build process, prior to invoking
|
||||
// hooks. For some reason this happens in the ValidateFeatures call on the SDK builder. Reinvoke it to
|
||||
// refresh this debug info.
|
||||
var avatar = avatarGameObject.GetComponent<VRCAvatarDescriptor>();
|
||||
var animator = avatarGameObject.GetComponent<Animator>();
|
||||
var builder = new VRCSdkControlPanelAvatarBuilder3A();
|
||||
builder.RegisterBuilder(ScriptableObject.CreateInstance<VRCSdkControlPanel>());
|
||||
builder.ValidateFeatures(avatar, animator, new AvatarPerformanceStats(false));
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
{
|
||||
"name": "net.fushizen.modular-avatar.core.editor",
|
||||
"references": [
|
||||
"GUID:fc900867c0f47cd49b6e2ae4ef907300",
|
||||
"GUID:5718fb738711cd34ea54e9553040911d"
|
||||
"GUID:fc900867c0f47cd49b6e2ae4ef907300",
|
||||
"GUID:5718fb738711cd34ea54e9553040911d",
|
||||
"GUID:6e9c6119ac4eb334284fb7b4bc6d1f05",
|
||||
"GUID:b906909fcc54f634db50f2cad0f988d9"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
|
Loading…
Reference in New Issue
Block a user