mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-20 13:20:06 +08:00
6d2084aca2
https://feedback.vrchat.com/sdk-bug-reports/p/exceptions-thrown-from-onpreprocessavatar-hooks-do-not-abort-the-build
25 lines
676 B
C#
25 lines
676 B
C#
using System;
|
|
using UnityEngine;
|
|
using VRC.SDKBase.Editor.BuildPipeline;
|
|
|
|
namespace net.fushizen.modular_avatar.core.editor
|
|
{
|
|
public abstract class HookBase : IVRCSDKPreprocessAvatarCallback
|
|
{
|
|
public bool OnPreprocessAvatar(GameObject avatarGameObject)
|
|
{
|
|
try
|
|
{
|
|
return OnPreprocessAvatarWrapped(avatarGameObject);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Debug.LogError(e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
protected abstract bool OnPreprocessAvatarWrapped(GameObject avatarGameObject);
|
|
public abstract int callbackOrder { get; }
|
|
}
|
|
} |