Raplace Unity ver array with Unity ver class

This commit is contained in:
VaDiM
2024-03-30 14:19:54 +03:00
parent c9e9bc840c
commit 3cc6bed844
39 changed files with 830 additions and 341 deletions

View File

@ -871,11 +871,11 @@ namespace AssetStudio
public int Length;
public int Segment;
public ShaderSubProgramEntry(BinaryReader reader, int[] version)
public ShaderSubProgramEntry(BinaryReader reader, UnityVersion version)
{
Offset = reader.ReadInt32();
Length = reader.ReadInt32();
if (version[0] > 2019 || (version[0] == 2019 && version[1] >= 3)) //2019.3 and up
if (version >= (2019, 3)) //2019.3 and up
{
Segment = reader.ReadInt32();
}
@ -887,7 +887,7 @@ namespace AssetStudio
public ShaderSubProgramEntry[] entries;
public ShaderSubProgram[] m_SubPrograms;
public ShaderProgram(BinaryReader reader, int[] version)
public ShaderProgram(BinaryReader reader, UnityVersion version)
{
var subProgramsCapacity = reader.ReadInt32();
entries = new ShaderSubProgramEntry[subProgramsCapacity];