Solve the problem that some angles cannot be seen when using SkinnedMeshRenderer
1. Problems
2. Solutions. There should be a rope there in the picture above. You need to check an option to achieve it.
3. Result
4. Sometimes I forget to check and cannot find many components at once. Use the code below directly to modify the settings globally with one click.
/*****************************************************************
*Author: ZhaoZhen
*UnityVersion: 2020.3.1f1
*Function:
*******************************************************************/
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace zhaozhen
{
/// <summary>
/// 改变SkinnedMeshRenderer属性,解决绳子有时候看不到的问题
/// </summary>
public class ChangeSkinnedMeshRendererWindowScript : EditorWindow
{
[MenuItem("Tools/更该SkinnedMeshRenderer属性,绳子实时显示")]
public static void ChangeSkinnedMeshRendererWindowFunc()
{
var tArray = Resources.FindObjectsOfTypeAll(typeof(SkinnedMeshRenderer));
foreach (var item in tArray)
{
SkinnedMeshRenderer skinnedMeshRenderer = item as SkinnedMeshRenderer;
skinnedMeshRenderer.updateWhenOffscreen = true;
}
Debug.Log("实时显示绳子设置成功!");
}
}
}