Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshcamas/mlf-unity
The Multi Language Format interpretor for Unity3D
https://github.com/joshcamas/mlf-unity
unity3d yaml
Last synced: about 4 hours ago
JSON representation
The Multi Language Format interpretor for Unity3D
- Host: GitHub
- URL: https://github.com/joshcamas/mlf-unity
- Owner: joshcamas
- Created: 2019-02-20T15:15:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T15:37:41.000Z (over 5 years ago)
- Last Synced: 2024-08-02T05:13:34.327Z (3 months ago)
- Topics: unity3d, yaml
- Language: C#
- Size: 186 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mlf-unity
The Multi Language Format interpretor for Unity3DNote: This addon requires [Odin Inspector](https://assetstore.unity.com/packages/tools/utilities/odin-inspector-and-serializer-89041)
### About MLF
MLF is a simple format that allows multiple human readable languages to be present in the same file. This interpretor for Unity3D imports these files, and makes them actually usable in engine.
MLF is currently utilized in-house by Spellcast Studios in Unity3D for a variety of uses, such as scripting, quests and dialog.
### Supported Languages
The Core of MLF does not support any languages by itself - instead, MLF Processors can be added to attach new formats and other features to the interpretor.
Alongside Core, this repo also has a simple YAML formatter, which automatically deserializes the content using YamlDotNet. This is mainly intended as an example of the usage of MLF.
### Examples
Here is an example of how Spellcast Studios uses MLF for Dialog:
```
@yaml
[[Dialog "Topic"]]
- topic: "Where are you from?"
onselect:
speak_select:
selector: random
values:
- "I've lived in Eastern Aruden, the Wetlands, for all my life. Someday I wish to travel the world."
- "I've been stuck here for all my years. I wish I wasn't"
- "The Wetlands, I'm afraid. Been here all my life."
options:
- value: "Well, the wetlands has it's own beauty"
speak: "I suppose so, friend. I suppose so."
- value: "I too wish to explore the world, I hate staying in one place for too long"
speak: "I have also grown sick of being here..."
```In this case, our dialog system deserializes this YAML block during runtime, and then steps through it as it desires.