mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 18:55:06 +08:00
fix: potential null reference exceptions from ProxyManager (#750)
* chore: fix incorrect namespace * fix: potential null reference exceptions from ProxyManager
This commit is contained in:
parent
01d24f6809
commit
17e6c22335
@ -3,13 +3,12 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using nadena.dev.modular_avatar.JacksonDunstan.NativeCollections;
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditor.SceneManagement;
|
using UnityEditor.SceneManagement;
|
||||||
#endif
|
#endif
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -90,7 +89,7 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
internal static ImmutableDictionary<SkinnedMeshRenderer, SkinnedMeshRenderer> OriginalToProxyRenderer =>
|
internal static ImmutableDictionary<SkinnedMeshRenderer, SkinnedMeshRenderer> OriginalToProxyRenderer =>
|
||||||
_originalToReplacementRenderer;
|
_originalToReplacementRenderer;
|
||||||
|
|
||||||
internal static ImmutableHashSet<GameObject> RetainedObjects;
|
internal static ImmutableHashSet<GameObject> RetainedObjects = ImmutableHashSet<GameObject>.Empty;
|
||||||
|
|
||||||
internal static bool ShouldRetain(GameObject obj) => RetainedObjects.Contains(obj);
|
internal static bool ShouldRetain(GameObject obj) => RetainedObjects.Contains(obj);
|
||||||
|
|
||||||
@ -220,7 +219,7 @@ namespace nadena.dev.modular_avatar.core
|
|||||||
for (var i = 0; i < weights.Length; i++)
|
for (var i = 0; i < weights.Length; i++)
|
||||||
{
|
{
|
||||||
var bone = bones[weights[i].boneIndex];
|
var bone = bones[weights[i].boneIndex];
|
||||||
if (_capturedBones.ContainsKey(bone)) return true;
|
if (bone != null && _capturedBones.ContainsKey(bone)) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
#region
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
namespace nadena.dev.modular_avatar.JacksonDunstan.NativeCollections
|
#endregion
|
||||||
|
|
||||||
|
namespace nadena.dev.modular_avatar
|
||||||
{
|
{
|
||||||
internal class ObjectIdentityComparer<T> : IEqualityComparer<T>
|
internal class ObjectIdentityComparer<T> : IEqualityComparer<T>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user