- [Core] Fix bug with assets parsing.

This commit is contained in:
Razmoth
2023-11-24 21:17:13 +04:00
parent 2568e4be08
commit 4c0f1ec44b
45 changed files with 725 additions and 672 deletions

View File

@@ -9,7 +9,7 @@ namespace AssetStudio
{
public sealed class GameObject : EditorExtension
{
public PPtr<Component>[] m_Components;
public List<PPtr<Component>> m_Components;
public string m_Name;
public Transform m_Transform;
@@ -23,14 +23,14 @@ namespace AssetStudio
public GameObject(ObjectReader reader) : base(reader)
{
int m_Component_size = reader.ReadInt32();
m_Components = new PPtr<Component>[m_Component_size];
m_Components = new List<PPtr<Component>>();
for (int i = 0; i < m_Component_size; i++)
{
if ((version[0] == 5 && version[1] < 5) || version[0] < 5) //5.5 down
{
int first = reader.ReadInt32();
}
m_Components[i] = new PPtr<Component>(reader);
m_Components.Add(new PPtr<Component>(reader));
}
var m_Layer = reader.ReadInt32();