Switch language: RUS | ENG
Unity Editor tool, which helps design game-logic database (such as characters, weapons, items stats etc.) using Google Spreadsheets.
- Unity Engine 2021.3+
To install this package using Unity Package Manager simply insert this address:
https://github.com/NorskaGames/NorskaLib.Spreadsheets.git
Important: You need to have Git installed in your OS. You can get one from here:
https://git-scm.com/
Create your Spreadsheet and make sure you enable access via link:
Hint: Design your database as any relational database (at least stick to 1st normal form: avoid lists inside a cell).
Define your custom SpreadsheetContainer and any amount of Data classes as shown below:
using NorskaLib.Spreadsheets;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace NorskaLibExamples.Spreadsheets
{
[Serializable]
public class SpreadshetContent
{
[SpreadsheetPage("Units")]
public List<UnitData> Units;
[SpreadsheetPage("Skills")]
public List<SkillData> Skills;
[SpreadsheetPage("UnitsSkills")]
public List<UnitSkillData> UnitsSkills;
}
[CreateAssetMenu(fileName = "SpreadsheetContainer", menuName = "SpreadsheetContainer")]
public class SpreadsheetContainer : SpreadsheetsContainerBase
{
[SpreadsheetContent]
[SerializeField] SpreadshetContent content;
public SpreadshetContent Content => content;
}
}
Important! Make sure you spell variables names exactly as columns headers in the spreadsheet.
You can serialize your spreadsheet as .bin or .json to use it somewhere else (on the dedicated server, for example).