- [Core] Fix bug with assets parsing.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user