mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-06 14:45:06 +08:00
Fix/remove some console messages
This commit is contained in:
parent
1bc55ab878
commit
75a0d66cce
@ -139,11 +139,6 @@ namespace net.fushizen.modular_avatar.core.editor
|
|||||||
if (iter.objectReferenceValue is Transform t)
|
if (iter.objectReferenceValue is Transform t)
|
||||||
{
|
{
|
||||||
var mapped = MapBoneReference(t, retargetable);
|
var mapped = MapBoneReference(t, retargetable);
|
||||||
if (mapped != iter.objectReferenceValue)
|
|
||||||
{
|
|
||||||
Debug.LogWarning(
|
|
||||||
$"Remapping property path {iter.propertyPath} from {iter.objectReferenceValue} to {mapped} on {c}");
|
|
||||||
}
|
|
||||||
|
|
||||||
iter.objectReferenceValue = mapped;
|
iter.objectReferenceValue = mapped;
|
||||||
ClearToDeleteFlag(mapped);
|
ClearToDeleteFlag(mapped);
|
||||||
@ -151,11 +146,6 @@ namespace net.fushizen.modular_avatar.core.editor
|
|||||||
else if (iter.objectReferenceValue is GameObject go)
|
else if (iter.objectReferenceValue is GameObject go)
|
||||||
{
|
{
|
||||||
var mapped = MapBoneReference(go.transform, retargetable);
|
var mapped = MapBoneReference(go.transform, retargetable);
|
||||||
if (mapped?.gameObject != iter.objectReferenceValue)
|
|
||||||
{
|
|
||||||
Debug.LogWarning(
|
|
||||||
$"Remapping property path {iter.propertyPath} from {iter.objectReferenceValue} to {mapped} on {c}");
|
|
||||||
}
|
|
||||||
|
|
||||||
iter.objectReferenceValue = mapped?.gameObject;
|
iter.objectReferenceValue = mapped?.gameObject;
|
||||||
ClearToDeleteFlag(mapped);
|
ClearToDeleteFlag(mapped);
|
||||||
@ -312,9 +302,6 @@ namespace net.fushizen.modular_avatar.core.editor
|
|||||||
if ((constraintType != null && constraintType != typeof(ParentConstraint))
|
if ((constraintType != null && constraintType != typeof(ParentConstraint))
|
||||||
|| (constraintType == null && src.GetComponent<IConstraint>() != null))
|
|| (constraintType == null && src.GetComponent<IConstraint>() != null))
|
||||||
{
|
{
|
||||||
Debug.LogWarning(
|
|
||||||
$"Retaining: {RuntimeUtil.RelativePath(RuntimeUtil.FindAvatarInParents(src.transform).gameObject, src.gameObject)}" +
|
|
||||||
$"with constraintType {constraintType} and constraint {src.GetComponent<IConstraint>()}");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ namespace net.fushizen.modular_avatar.core
|
|||||||
|
|
||||||
private void OnValidate()
|
private void OnValidate()
|
||||||
{
|
{
|
||||||
|
if (RuntimeUtil.isPlaying) return;
|
||||||
RuntimeUtil.delayCall(Rebind);
|
RuntimeUtil.delayCall(Rebind);
|
||||||
RuntimeUtil.OnHierarchyChanged -= Rebind;
|
RuntimeUtil.OnHierarchyChanged -= Rebind;
|
||||||
RuntimeUtil.OnHierarchyChanged += Rebind;
|
RuntimeUtil.OnHierarchyChanged += Rebind;
|
||||||
@ -62,6 +63,8 @@ namespace net.fushizen.modular_avatar.core
|
|||||||
|
|
||||||
private void Rebind()
|
private void Rebind()
|
||||||
{
|
{
|
||||||
|
if (this == null) return;
|
||||||
|
|
||||||
_editorBindings = new List<EditorBlendshapeBinding>();
|
_editorBindings = new List<EditorBlendshapeBinding>();
|
||||||
|
|
||||||
var localRenderer = GetComponent<SkinnedMeshRenderer>();
|
var localRenderer = GetComponent<SkinnedMeshRenderer>();
|
||||||
|
Loading…
Reference in New Issue
Block a user