-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformat.cs
More file actions
132 lines (115 loc) · 3.11 KB
/
format.cs
File metadata and controls
132 lines (115 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
public class CommunityIndex
{
public List<CommunityPlaceableElement> Tiles = new List<CommunityPlaceableElement>();
public List<CommunityPlaceableElement> Props = new List<CommunityPlaceableElement>();
public List<CommunityCreatureElement> Creatures = new List<CommunityCreatureElement>();
public List<CommunityMusicElement> Music = new List<CommunityMusicElement>();
public List<CommunityIconAtlasElement> IconsAtlases = new List<CommunityIconAtlasElement>();
}
// {
// "Tiles": [ ... ],
// "Props": [ ... ],
// "Creatures": [ ... ],
// "Music": [ ... ],
// "IconsAtlases": [ ... ]
// }
public class CommunityAssetElement
{
public string Id;
public string Name;
public bool IsDeprecated;
public string GroupTag;
public string[] Tags;
}
// {
// "Id": "32cfd208-c363-4434-b817-8ba59faeed17",
// "Name": "Castle Floor 1",
// "IsDeprecated": false,
// "GroupTag": "floor",
// "Tags": [ "tag0", "tag1", ... ]
// }
public class CommunityPlaceableElement : CommunityAssetElement
{
public CommunityAssetLoaderData[] Assets;
public bool IsInteractable;
public Bounds ColliderBoundsBound;
public CommunityIconElement Icon;
}
// {
// ...
// "Assets": [ ... ]
// "IsInteractable": false,
// "ColliderBoundsBound": {
// "m_Center": { "x": 0.5, "y": 0.25, "z": 0.5 },
// "m_Extent": { "x": 0.5, "y": 0.25, "z": 0.5 }
// },
// "Icon": { ... }
// }
public class CommunityCreatureElement : CommunityAssetElement
{
public CommunityAssetLoaderData MiniAsset;
public CommunityAssetLoaderData BaseAsset;
public float DefaultScale;
public CommunityIconElement Icon;
}
// {
// ...
// "MiniAsset": { ... },
// "BaseAsset": { ... },
// "DefaultScale": 1.0,
// "Icon": { ... }
// }
public class CommunityMusicElement : CommunityAssetElement
{
public CommunityLoaderData Asset;
}
// {
// ...
// "CommunityLoaderData": { ... }
// }
public class CommunityAssetLoaderData
{
public CommunityLoaderData LoaderData;
public Vector3 Position;
public Quaternion Rotation;
public Vector3 Scale;
}
// {
// "LoaderData": { ... },
// "Position": { "x": 0.1, "y": 0.1, "z": 0.1 },
// "Rotation": { "x": 0, "y": 0, "z": 0, "w": 1 },
// "Scale": { "x": 0.3, "y": 0.3, "z": 0.3 }
// }
public class CommunityLoaderData
{
public string BundleId;
public string AssetName;
}
// {
// "BundleId": "char_camel_01_1606089934",
// "AssetName": "Camel01"
// }
public class CommunityIconElement
{
public int AtlasIndex;
public Rect Region;
}
// note: the index is the index into the IconsAtlases info
// note: the region values are normalized with respect to the size of the image
//
// {
// "AtlasIndex": 2,
// "Region": {
// "x": 0.125,
// "y": 0.9375,
// "width": 0.0625,
// "height": 0.0625
// }
// }
public class CommunityIconAtlasElement
{
public string Path;
}
// {
// "Path": "aTVvbnNj"
// }