41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
#if UNITY_EDITOR && !FUNCELL_LAUNCHER
|
|
using UnityEngine;
|
|
|
|
namespace Thousandto.Launcher.ExternalLibs
|
|
{
|
|
/// <summary>
|
|
/// 子节点的MeshInfo
|
|
/// </summary>
|
|
public class ChildMesh
|
|
{
|
|
private Color[] _colors;
|
|
public Mesh Mesh { get; set; }
|
|
public Transform Transform { get; set; }
|
|
public int LightmapIndex { get; set; }
|
|
public Vector4 LightmapScaleOffset { get; set; }
|
|
public int StartIndex { get; set; }
|
|
public Vector3[] OldVertices { get; private set; }
|
|
public Vector3[] NewVertices { get; set; }
|
|
public bool IsDirty { get; set; }
|
|
|
|
//构造函数
|
|
public ChildMesh(Transform tran,Mesh mesh, MeshRenderer render)
|
|
{
|
|
Transform = tran;
|
|
Mesh = mesh;
|
|
_colors = Mesh.colors;
|
|
if (render != null)
|
|
{
|
|
LightmapIndex = render.lightmapIndex;
|
|
LightmapScaleOffset = render.lightmapScaleOffset;
|
|
}
|
|
else
|
|
{
|
|
LightmapIndex = -1;
|
|
LightmapScaleOffset = new Vector4(1, 1, 0, 0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif
|