https://github.com/vintall/unity-free-online-config
A simple unity online config based on google spreadsheets.
https://github.com/vintall/unity-free-online-config
config google-spreadsheets spreadsheets unity unity3d unity3d-plugin vufoc
Last synced: 13 days ago
JSON representation
A simple unity online config based on google spreadsheets.
- Host: GitHub
- URL: https://github.com/vintall/unity-free-online-config
- Owner: Vintall
- License: mit
- Created: 2024-08-24T20:20:18.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-28T17:32:40.000Z (over 1 year ago)
- Last Synced: 2025-10-24T18:41:23.079Z (4 months ago)
- Topics: config, google-spreadsheets, spreadsheets, unity, unity3d, unity3d-plugin, vufoc
- Language: C#
- Homepage:
- Size: 1.62 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 
VUFOC is a simple external config's loader, for places, where you need to change a few variables but can't / don't want to make another build.
You can download you config in one press of a button from inspector or download on startup.
Create as many configs as you like
# Features
- Minimalistic and Quick
- No need to host or buy a server
- Unlimited configs
# How to install
## Install via GIT URL
- Copy link to package ```https://github.com/Vintall/Unity-Free-Online-Config.git#master```
- In unity go to **Window** -> **Package Manager**

![]()
- In the top left corner click **+** -> **Add package from git URL...**

![]()
- Paste the link to your spreadsheet in field and click **Add**.

![]()
## Install via Unity Package
- Download the latest release https://github.com/Vintall/Unity-Free-Online-Config/releases
- Double-click on .unitypackage or drag it onto editor
- Choose files to import. You will import all files by default
# Quick start
## Create and publish Google spreadsheet
- Go to https://docs.google.com/spreadsheets. Make sure you're logged into your account
- Create a blank spreadsheet.

![]()
- Go to **File** -> **Share** -> **Publish to web**

![]()
- In "Publish to the web" pop-up in the left column choose a specific sheet that you want to use as your database. Later on you can make as many as you want.

![]()
- In the right column pick **Tab-separated values (.tsv)**

![]()
- In "Published content & settings" you have several fields.
- First of all, choose entire document in first field.
- You most likely want to have enabled "Automatically republish when changes are made". Otherwise you will need to republish it manually every time.
- Press **Start publishing** to generate link to your sheet.

![]()
- Copy the link to your sheet.

![]()
## Connect to spreadsheet in Unity
Automatic Config Creation
- Go to VUFOC -> Create New Config

![]()
- In the following window you have two required fields
- Config Name, which is used in class names. Be sure to fill it according to C# class naming restrictions
- List of fields, which is used for VO creation.

![]()
*Optionally, you can embed both name and url info file field. If you choose otherwise, you will need to fill it manually in ScriptableObject inspector.
Manual Config Creation
- Create two scripts: ExampleDatabase.cs and ExampleVo.cs
- ExampleVo extend class ASpreadsheetVo. This is one line of data from your database.
```
[Serializable]
public class ExampleVo : ASpreadsheetVo
{
public string ExampleString;
public int ExampleInt;
public float ExampleFloat;
public double ExampleDouble;
}
```
- ExampleDatabase is a class, that holds database name, url and list of ExampleVo's. Every database have a ScriptableObject, as base class. So, for every database we need to specity attribute [CreateAssetMenu]. You can read more about ScriptableObjects in official unity documentation https://docs.unity3d.com/Manual/class-ScriptableObject.html.
```
[CreateAssetMenu(fileName = "ExampleDatabase", menuName = "Databases/ExampleDatabase")]
public class ExampleDatabase : ASpreadsheetConfig
{
[SerializeField] private string databaseName;
[SerializeField] private string databaseDataUrl;
public override string DatabaseName => databaseName;
public override string DatabaseDataUrl => databaseDataUrl;
protected override ASpreadsheetVo TemplateVo => new ExampleVo();
}
```
- In editor right click onto project window -> Create -> Configs -> ExampleConfig. That will create a ScriptableObject of your config

![]()
- Go to your spreadsheet and fill up some data. Columns shoud be corresponding in format an order. In our case ExampleVo has the folowing fields: "string", "int", "float", "double". So, the column will be read as "A":"string", "B":"int", "C":"float", "D":"double".

![]()
- Go back to editor. And place config name (optional) and url. Then click *Download*

![]()
- Data from spreadsheet should appear in *SpreadsheetEntries* list.
