chore: 添加程序说明

This commit is contained in:
m0_75251201
2025-11-01 15:53:39 +08:00
parent 67c886a904
commit 4f144bef9a
5 changed files with 19 additions and 14 deletions

View File

@@ -83,16 +83,22 @@ namespace HideCharacter
rendererList.Clear();
var obj = GameObject.Find("ModelRoot");
if (!obj) return;
//角色的模型是最先加载的,就直接先查找了,避免找到其他实体的身体
bodyPartObject = GameObject.Find("Pelvis");
healthBar=GameObject.Find("HealthBars");
healthBar = GameObject.Find("HealthBars");
needRefresh = true;
//防止无法正常恢复身体
//身体的SkinnedMeshRenderer如果不隐藏会发现身体无法恢复
foreach (var skinnedMeshRenderer in obj.GetComponentsInChildren<SkinnedMeshRenderer>())
{
rendererList.Add(skinnedMeshRenderer);
}
}
/// <summary>
/// 查找身体部件不使用对Meshderer的隐藏是因为测试的时候发现没有正确隐藏
/// 可能是测试逻辑错了,就先这样写了
/// </summary>
/// <param name="parentTransform"></param>
void FindChildObjectsRecursively(Transform parentTransform)
{
foreach (Transform child in parentTransform)
@@ -157,6 +163,7 @@ namespace HideCharacter
{
if (hideList != null)
{
//使用懒刷新是因为发现在开始查找的时候会找不到眼睛和眉毛,可能是还没有创建,就改为在切换时刷新了
if (needRefresh)
{
if (bodyPartObject != null)

View File

@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
// This code was generated by a tool.
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@@ -14,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("折纸的小箱子")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+997656613e0fbe2d5c91ade63b444626bd3b2118")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+67c886a904a55669c91d6b4d101ba669f1a59c5d")]
[assembly: System.Reflection.AssemblyProductAttribute("HideCharacter")]
[assembly: System.Reflection.AssemblyTitleAttribute("HideCharacter")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]

View File

@@ -1 +1 @@
48d289dd6735a7b3ddf70fbe6ce44ffed0c2efc083980141390d8c5617b15586
423a7b55d07af8fb848effe82fa4e72899cf064d03a0fb4c9600918ccf2d9009

View File

@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
// This code was generated by a tool.
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@@ -14,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("折纸的小箱子")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+997656613e0fbe2d5c91ade63b444626bd3b2118")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+67c886a904a55669c91d6b4d101ba669f1a59c5d")]
[assembly: System.Reflection.AssemblyProductAttribute("SceneSnapshot")]
[assembly: System.Reflection.AssemblyTitleAttribute("SceneSnapshot")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]

View File

@@ -1 +1 @@
83eb8e0c4ef430532b21f1a1b7877dbc2a23fdbfef7150469e7b60e157f7be59
c40649a2db1e99856594eda4b1fa3d71f4abfa511ffb3c2e60408c3d3561c7e2