can save/load entity info with Json file.
https://www.youtube.com/watch?v=TzMSpb3g7_A&feature=youtu.be
https://github.com/sschmid/Entitas-CSharp
this is still experimental.
added excel2Json.
can read multiple template group.
support templete name.
component subfix removes.
tag type components now added to Tags array.
{
"Name": "MyFire",
"Context": "Game",
"Tags": [
"SomeTag"
],
"Components": {
"Fire": {
"Strength": 1.0
},
"Name": {
"Value": "ddd"
},
"Position2D": {
"X": 0.0,
"Y": 0.0
}
}
}
entity templete file is now clean Json format.
{
"ContextType": "Game",
"Components": {
"Fire": {
"Strength": 0
},
"Name": {
"Value": "fire1"
},
"Position2D": {
"X": 1,
"Y": 2
},
"SavingDataComponent": {},
"SomeFloatComponent": {
"Value": 0
},
"SomeStringComponent": {
"Value": "abcde"
}
}
}
save file size reduces.
added [IgnoreSave] class attribute. with this, component will not be saved.
some class reference can be serialized, some not. checking this can be difficult. so, add attribute hint for SaveLoader please.
ex) Unity.Vector3 can be save by this SaveLoader, but GameObject not. so we need to add [IgnoreSave] attribute to. (else, you will have null value component)
[Game]
public class SomeVector3Component : IComponent
{
public Vector3 Value;
}
[IgnoreSave]
[Game]
public class SomeGameObjectRefTypeComponent : IComponent
{
public GameObject Ref;
}
reduced save file size.
stop support scriptable oject.
can save/load all entities with 'SaveDataComponent'
fix not group added bug.
can save/load by Json file.
- go to asset store, install Json.Net.
- copy to Assets\Sources\Utility to your project
- done!
- make an entity in runtime.
- select an entity gameobject from hiarachy
- open tool/entity templete save loader
- enter name of templete
- save!
- you can find Json asset in asAssets\Resources\EntityTemplete
- play game
- open tool/entity templete save loader
- type name of templete
- make it!
- add 'savingDataCompontnt' flag to your desired entities.
- open tool/entity templete save loader
- save all!
- you got json file.
- load all!
- you got new entities.
entity templete is entity's context info + components info. it have values too.
clear entities before load?
merge to blueprint?
support scriptable object again?
link to google spread Sheet?