6 Following errors:
Assets\Easy Save 3\Types\ES3UserType_InventoryP1.cs(19,102): error CS1026: ) expected
Assets\Easy Save 3\Types\ES3UserType_InventoryP1.cs(19,117): error CS0443: Syntax error; value expected
Assets\Easy Save 3\Types\ES3UserType_InventoryP1.cs(19,120): error CS1002: ; expected
Assets\Easy Save 3\Types\ES3UserType_InventoryP1.cs(19,120): error CS1513: } expected
Assets\Easy Save 3\Types\ES3UserType_InventoryP1.cs(33,62): error CS0443: Syntax error; value expected
Assets\Easy Save 3\Types\ES3UserType_InventoryP1.cs(33,65): error CS1525: Invalid expression term ')'
Script:
using System;
using UnityEngine;
namespace ES3Types
{
[UnityEngine.Scripting.Preserve]
[ES3PropertiesAttribute("slots", "invUIP1", "InvUI1")]
public class ES3UserType_InventoryP1 : ES3ComponentType
{
public static ES3Type Instance = null;
public ES3UserType_InventoryP1() : base(typeof(InventoryP1)){ Instance = this; priority = 1;}
protected override void WriteComponent(object obj, ES3Writer writer)
{
var instance = (InventoryP1)obj;
writer.WriteProperty("slots", instance.slots, ES3Internal.ES3TypeMgr.GetES3Type(typeof(InventoryP1+InventorySlot[])));
writer.WritePrivateFieldByRef("invUIP1", instance);
writer.WriteProperty("InvUI1", instance.InvUI1, ES3Type_GameObjectArray.Instance);
}
protected override void ReadComponent<T>(ES3Reader reader, object obj)
{
var instance = (InventoryP1)obj;
foreach(string propertyName in reader.Properties)
{
switch(propertyName)
{
case "slots":
instance.slots = reader.Read<InventoryP1+InventorySlot[]>();
break;
case "invUIP1":
reader.SetPrivateField("invUIP1", reader.Read<InvUIP1>(), instance);
break;
case "InvUI1":
instance.InvUI1 = reader.Read<UnityEngine.GameObject[]>(ES3Type_GameObjectArray.Instance);
break;
default:
reader.Skip();
break;
}
}
}
}
public class ES3UserType_InventoryP1Array : ES3ArrayType
{
public static ES3Type Instance;
public ES3UserType_InventoryP1Array() : base(typeof(InventoryP1[]), ES3UserType_InventoryP1.Instance)
{
Instance = this;
}
}
}
Have some errors on an inventory array with ES3
Re: Have some errors on an inventory array with ES3
Hi there,
We don't appear to have had any reports of this. Please could you send me your InventoryP1 class so that I can replicate this at my end?
All the best,
Joel
We don't appear to have had any reports of this. Please could you send me your InventoryP1 class so that I can replicate this at my end?
All the best,
Joel
Re: Have some errors on an inventory array with ES3
Thanks for sending that over, that helped me identify the issue. It looks like reflection wasn't recognising the nested type when it's part of a collection.
If you private message me your invoice number I'll send over an update to resolve this.
All the best,
Joel
If you private message me your invoice number I'll send over an update to resolve this.
All the best,
Joel
Re: Have some errors on an inventory array with ES3
Thank you Joel for the incredibly fast response, where I can check/get my invoice number?
EDIT: Got it. ask didnt happen
EDIT: Got it. ask didnt happen