chore: fix compile warnings (#853)

This commit is contained in:
bd_ 2024-05-13 07:47:14 +09:00 committed by GitHub
parent 1c0be75e28
commit c9db3debcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 14 deletions

View File

@ -38,7 +38,7 @@ namespace nadena.dev.modular_avatar.core.editor
if (_window != null) DestroyImmediate(_window); if (_window != null) DestroyImmediate(_window);
} }
protected virtual void OnDestroy() protected override void OnDestroy()
{ {
base.OnDestroy(); base.OnDestroy();
if (_window != null) DestroyImmediate(_window); if (_window != null) DestroyImmediate(_window);

View File

@ -24,7 +24,9 @@ namespace nadena.dev.modular_avatar.core.editor
protected override VisualElement CreateInnerInspectorGUI() protected override VisualElement CreateInnerInspectorGUI()
{ {
#pragma warning disable CS0618 // Type or member is obsolete
var root = uxml.Localize(); var root = uxml.Localize();
#pragma warning restore CS0618 // Type or member is obsolete
root.styleSheets.Add(uss); root.styleSheets.Add(uss);
var container = root.Q<VisualElement>("group-container"); var container = root.Q<VisualElement>("group-container");

View File

@ -123,7 +123,7 @@ namespace nadena.dev.modular_avatar.core.editor
} }
} }
} }
catch (MissingComponentException e) catch (MissingComponentException _)
{ {
// No animator? weird. Move on. // No animator? weird. Move on.
} }

View File

@ -62,8 +62,6 @@ namespace nadena.dev.modular_avatar.core.editor
private BuildContext _context; private BuildContext _context;
private int internalParamIndex = 0;
// TODO: Move into NDMF // TODO: Move into NDMF
private ImmutableList<string> PhysBoneSuffixes = ImmutableList<string>.Empty private ImmutableList<string> PhysBoneSuffixes = ImmutableList<string>.Empty
.Add("_IsGrabbed") .Add("_IsGrabbed")
@ -326,12 +324,10 @@ namespace nadena.dev.modular_avatar.core.editor
rv = BuildReport.ReportingObject(p, () => CollectParameters(p, paramInfo.GetParameterRemappingsAt(p, true))); rv = BuildReport.ReportingObject(p, () => CollectParameters(p, paramInfo.GetParameterRemappingsAt(p, true)));
} }
var willPurgeAnimators = false;
foreach (var merger in obj.GetComponents<ModularAvatarMergeAnimator>()) foreach (var merger in obj.GetComponents<ModularAvatarMergeAnimator>())
{ {
if (merger.deleteAttachedAnimator) if (merger.deleteAttachedAnimator)
{ {
willPurgeAnimators = true;
break; break;
} }
} }

View File

@ -17,7 +17,6 @@ namespace nadena.dev.modular_avatar.core.armature_lock
private Action _dispose; private Action _dispose;
private bool _isValid = true; private bool _isValid = true;
private long _lastHierarchyCheck = -1;
private Action _update; private Action _update;
internal ImmutableList<(Transform, Transform)> RecordedParents; internal ImmutableList<(Transform, Transform)> RecordedParents;

View File

@ -14,17 +14,12 @@ namespace nadena.dev.modular_avatar.core
internal sealed class ScaleProxy : AvatarTagComponent internal sealed class ScaleProxy : AvatarTagComponent
{ {
#if UNITY_EDITOR #if UNITY_EDITOR
void OnValidate() protected override void OnValidate()
{ {
base.OnValidate(); base.OnValidate();
EditorApplication.delayCall += DeferredValidate; EditorApplication.delayCall += DeferredValidate;
} }
void OnDestroy()
{
base.OnDestroy();
}
private void DeferredValidate() private void DeferredValidate()
{ {
if (this == null) return; if (this == null) return;