mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-03-10 15:54:56 +08:00
Add warning in inspector UI for incompatible VRCSDK versions. (#147)
This commit is contained in:
parent
b7b4fde863
commit
e7ec5b08b4
@ -33,15 +33,19 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
[InitializeOnLoad]
|
||||
internal static class ComponentAllowlistPatch
|
||||
{
|
||||
internal static readonly bool PATCH_OK;
|
||||
|
||||
static ComponentAllowlistPatch()
|
||||
{
|
||||
try
|
||||
{
|
||||
PatchAllowlist();
|
||||
PATCH_OK = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogException(e);
|
||||
PATCH_OK = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using UnityEditor;
|
||||
using UnityEditor.Experimental.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SocialPlatforms;
|
||||
|
||||
namespace nadena.dev.modular_avatar.core.editor
|
||||
{
|
||||
@ -19,5 +20,10 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
EditorGUILayout.HelpBox(Localization.S("hint.not_in_avatar"), MessageType.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
public static void DisplayVRCSDKVersionWarning()
|
||||
{
|
||||
EditorGUILayout.HelpBox(Localization.S("hint.bad_vrcsdk"), MessageType.Error);
|
||||
}
|
||||
}
|
||||
}
|
@ -116,6 +116,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
}
|
||||
|
||||
InspectorCommon.DisplayOutOfAvatarWarning(targets);
|
||||
if (!ComponentAllowlistPatch.PATCH_OK) InspectorCommon.DisplayVRCSDKVersionWarning();
|
||||
|
||||
OnInnerInspectorGUI();
|
||||
}
|
||||
|
@ -53,5 +53,6 @@
|
||||
"boneproxy.attachment": "Attachment mode",
|
||||
"boneproxy.attachment.AsChildAtRoot": "As child; at root",
|
||||
"boneproxy.attachment.AsChildKeepWorldPosition": "As child; keep position",
|
||||
"pb_blocker.help": "This object will not be affected by PhysBones attached to parents."
|
||||
"pb_blocker.help": "This object will not be affected by PhysBones attached to parents.",
|
||||
"hint.bad_vrcsdk": "Incompatible version of VRCSDK detected.\n\nPlease try upgrading your VRCSDK; if this does not work, check for a newer version of Modular Avatar as well."
|
||||
}
|
@ -53,5 +53,6 @@
|
||||
"boneproxy.attachment": "配置モード",
|
||||
"boneproxy.attachment.AsChildAtRoot": "子として・ルートに配置",
|
||||
"boneproxy.attachment.AsChildKeepWorldPosition": "子として・ワールド位置を維持",
|
||||
"pb_blocker.help": "このオブジェクトは親のPhysBoneから影響を受けなくなります。"
|
||||
"pb_blocker.help": "このオブジェクトは親のPhysBoneから影響を受けなくなります。",
|
||||
"hint.bad_vrcsdk": "使用中のVRCSDKのバージョンとは互換性がありません。\n\nVRCSDKを更新してみてください。それでもだめでしたら、Modular Avatarにも最新版が出てないかチェックしてください。"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user