-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unity version 2022.3.11f1 Crash when import example of HeroSheet.cs #35
Comments
Hello. I import package, and copy paste the code of https://github.com/cathei/BakingSheet/blob/master/UnityProject/Assets/Samples/001%20-%20Define%20Sheet%20Container/HeroSheet.cs. And when i clone from gg sheet, Unity being Crash,
|
Thanks for reporting. I couldn't reproduce this locally. |
i tested again on unity 2022.3.8 and still being Crash. public class HeroSheet : Sheet<HeroSheet.Row>
{
public class Row : SheetRowArray<Elem>
{
public string Name { get; private set; }
public int Strength { get; private set; }
public int Inteligence { get; private set; }
public int Vitality { get; private set; }
public Elem GetLevel(int level)
{
// Level 1 would be index 0
return this[level - 1];
}
// Max level would be count of elements
public int MaxLevel => Count;
}
public class Elem : SheetRowElem
{
public float StatMultiplier { get; private set; }
public int RequiredExp { get; private set; }
public string RequiredMaterial { get; private set; }
}
}
public class TestSheetRuntime: SheetContainerBase
{
public TestSheetRuntime(Microsoft.Extensions.Logging.ILogger logger) : base(logger) {}
public HeroSheet HeroSheet { get; private set; }
}
public class TestGGSheetUI : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI logTxt;
[SerializeField] private string sheetId;
[SerializeField] private TextAsset credential;
[Button]
async void Pull()
{
TestSheetRuntime test = new( new UnityLogger());
var googleConverter = new GoogleSheetConverter(sheetId, credential.text);
await test.Bake(googleConverter);
logTxt.text = test.HeroSheet[0].Name;
}
} |
Bit late to reply, but your sheet appear ill-formed, as numbers (that should be in |
No description provided.
The text was updated successfully, but these errors were encountered: