mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-03-10 07:44:57 +08:00
chore: fix compiler warnings
This commit is contained in:
parent
7e5c227867
commit
b866628b24
@ -18,7 +18,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
{
|
{
|
||||||
return (EditorStyles.label?.lineHeight ?? 0) * 3;
|
return (EditorStyles.label?.lineHeight ?? 0) * 3;
|
||||||
}
|
}
|
||||||
catch (NullReferenceException e)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
// This can happen in early initialization...
|
// This can happen in early initialization...
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditor.UIElements;
|
using UnityEditor.UIElements;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
|
||||||
using UnityEngine.UIElements;
|
using UnityEngine.UIElements;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -148,7 +147,7 @@ namespace nadena.dev.modular_avatar.core.editor.ShapeChanger
|
|||||||
{
|
{
|
||||||
return targetObject?.GetComponent<Renderer>()?.sharedMaterials;
|
return targetObject?.GetComponent<Renderer>()?.sharedMaterials;
|
||||||
}
|
}
|
||||||
catch (MissingComponentException e)
|
catch (MissingComponentException)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
createInstaller = false;
|
createInstaller = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (MissingComponentException e)
|
catch (MissingComponentException)
|
||||||
{
|
{
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ namespace nadena.dev.modular_avatar.core.editor.ShapeChanger
|
|||||||
.Select(x => mesh.GetBlendShapeName(x))
|
.Select(x => mesh.GetBlendShapeName(x))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
catch (MissingComponentException e)
|
catch (MissingComponentException)
|
||||||
{
|
{
|
||||||
shapeNames = null;
|
shapeNames = null;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using Object = UnityEngine.Object;
|
||||||
#if MA_VRCSDK3_AVATARS
|
#if MA_VRCSDK3_AVATARS
|
||||||
using VRC.SDK3.Dynamics.PhysBone.Components;
|
using VRC.SDK3.Dynamics.PhysBone.Components;
|
||||||
#endif
|
#endif
|
||||||
@ -123,7 +123,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (MissingComponentException _)
|
catch (MissingComponentException)
|
||||||
{
|
{
|
||||||
// No animator? weird. Move on.
|
// No animator? weird. Move on.
|
||||||
}
|
}
|
||||||
@ -194,7 +194,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
{
|
{
|
||||||
if (!referencedGameObjects.Contains(go))
|
if (!referencedGameObjects.Contains(go))
|
||||||
{
|
{
|
||||||
UnityEngine.Object.DestroyImmediate(go);
|
Object.DestroyImmediate(go);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
{
|
{
|
||||||
return uxml != null && EditorStyles.label != null;
|
return uxml != null && EditorStyles.label != null;
|
||||||
}
|
}
|
||||||
catch (NullReferenceException _)
|
catch (NullReferenceException)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -157,9 +157,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
if (condition.ReferenceObject != null && !toggledObjects.Contains(condition.ReferenceObject))
|
if (condition.ReferenceObject != null && !toggledObjects.Contains(condition.ReferenceObject))
|
||||||
condition.IsConstant = asc.AnimationDatabase.ClipsForPath(asc.PathMappings.GetObjectIdentifier(condition.ReferenceObject)).IsEmpty;
|
condition.IsConstant = asc.AnimationDatabase.ClipsForPath(asc.PathMappings.GetObjectIdentifier(condition.ReferenceObject)).IsEmpty;
|
||||||
|
|
||||||
var i = 0;
|
|
||||||
// Remove redundant active conditions.
|
// Remove redundant active conditions.
|
||||||
int retain = 0;
|
|
||||||
actionGroup.ControllingConditions.RemoveAll(c => c.IsConstant && c.InitiallyActive);
|
actionGroup.ControllingConditions.RemoveAll(c => c.IsConstant && c.InitiallyActive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
n_nrm[i] = o_nrm[newToOrigVertIndex[i]];
|
n_nrm[i] = o_nrm[newToOrigVertIndex[i]];
|
||||||
n_tan[i] = o_tan[newToOrigVertIndex[i]];
|
n_tan[i] = o_tan[newToOrigVertIndex[i]];
|
||||||
}
|
}
|
||||||
catch (IndexOutOfRangeException e)
|
catch (IndexOutOfRangeException)
|
||||||
{
|
{
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
@ -250,7 +250,6 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
{
|
{
|
||||||
List<int> n2o = new List<int>(toRetainVertices.Length);
|
List<int> n2o = new List<int>(toRetainVertices.Length);
|
||||||
List<int> o2n = new List<int>(toRetainVertices.Length);
|
List<int> o2n = new List<int>(toRetainVertices.Length);
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
for (int j = 0; j < toRetainVertices.Length; j++)
|
for (int j = 0; j < toRetainVertices.Length; j++)
|
||||||
{
|
{
|
||||||
|
@ -385,8 +385,6 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
|
|
||||||
private static bool ValidateSetupOutfit(GameObject gameObj)
|
private static bool ValidateSetupOutfit(GameObject gameObj)
|
||||||
{
|
{
|
||||||
Object obj;
|
|
||||||
|
|
||||||
if (gameObj == null)
|
if (gameObj == null)
|
||||||
{
|
{
|
||||||
errorHeader = S("setup_outfit.err.header.notarget");
|
errorHeader = S("setup_outfit.err.header.notarget");
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using nadena.dev.ndmf;
|
using nadena.dev.ndmf;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@ -28,6 +29,11 @@ namespace modular_avatar_tests
|
|||||||
return transformMaskElements.SequenceEqual(other.transformMaskElements);
|
return transformMaskElements.SequenceEqual(other.transformMaskElements);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return HashCode.Combine(humanoidMaskElements, transformMaskElements);
|
||||||
|
}
|
||||||
|
|
||||||
public static ExtractedMask FromAvatarMask(AvatarMask mask)
|
public static ExtractedMask FromAvatarMask(AvatarMask mask)
|
||||||
{
|
{
|
||||||
var so = new SerializedObject(mask);
|
var so = new SerializedObject(mask);
|
||||||
|
Loading…
Reference in New Issue
Block a user