@@ -146,6 +146,7 @@ public class MeshPrecursor {
146
146
// For more info on the spec, see:
147
147
// https://github.com/KhronosGroup/glTF/
148
148
149
+ [ Serializable ]
149
150
public abstract class GltfRootBase : IDisposable {
150
151
public GltfAsset asset ;
151
152
// Tilt Brush/Blocks version that generated the gltf; null if not generated by that program
@@ -170,12 +171,14 @@ public void Dispose() {
170
171
protected virtual void Dispose ( bool disposing ) { }
171
172
}
172
173
174
+ [ Serializable ]
173
175
public abstract class GltfBufferBase {
174
176
public long byteLength ;
175
177
public string uri ;
176
178
[ JsonIgnore ] public IBufferReader data ;
177
179
}
178
180
181
+ [ Serializable ]
179
182
public abstract class GltfAccessorBase {
180
183
[ Serializable ] public enum ComponentType {
181
184
BYTE = 5120 , UNSIGNED_BYTE = 5121 , SHORT = 5122 , UNSIGNED_SHORT = 5123 ,
@@ -193,6 +196,7 @@ [Serializable] public enum ComponentType {
193
196
public abstract GltfBufferViewBase BufferViewPtr { get ; }
194
197
}
195
198
199
+ [ Serializable ]
196
200
public abstract class GltfBufferViewBase {
197
201
public int byteLength ;
198
202
public int byteOffset ;
@@ -201,6 +205,7 @@ public abstract class GltfBufferViewBase {
201
205
public abstract GltfBufferBase BufferPtr { get ; }
202
206
}
203
207
208
+ [ Serializable ]
204
209
public abstract class GltfPrimitiveBase {
205
210
[ Serializable ] public enum Mode { TRIANGLES = 4 }
206
211
public Mode mode = Mode . TRIANGLES ;
@@ -220,25 +225,29 @@ public abstract class GltfPrimitiveBase {
220
225
public abstract HashSet < string > GetAttributeNames ( ) ;
221
226
}
222
227
228
+ [ Serializable ]
223
229
public abstract class GltfImageBase {
224
230
public string uri ;
225
231
[ JsonIgnore ] public RawImage data ;
226
232
}
227
233
234
+ [ Serializable ]
228
235
public abstract class GltfTextureBase {
229
236
[ JsonIgnore ] public Texture2D unityTexture ;
230
237
231
238
public abstract object GltfId { get ; }
232
239
public abstract GltfImageBase SourcePtr { get ; }
233
240
}
234
241
242
+ [ Serializable ]
235
243
public abstract class GltfMaterialBase {
236
244
public string name ;
237
245
238
246
public abstract Dictionary < string , string > TechniqueExtras { get ; }
239
247
public abstract IEnumerable < GltfTextureBase > ReferencedTextures { get ; }
240
248
}
241
249
250
+ [ Serializable ]
242
251
public abstract class GltfMeshBase {
243
252
public string name ;
244
253
@@ -247,6 +256,7 @@ public abstract class GltfMeshBase {
247
256
public abstract GltfPrimitiveBase GetPrimitiveAt ( int i ) ;
248
257
}
249
258
259
+ [ Serializable ]
250
260
public abstract class GltfNodeBase {
251
261
public string name ;
252
262
public Matrix4x4 ? matrix ;
@@ -256,6 +266,7 @@ public abstract class GltfNodeBase {
256
266
public abstract IEnumerable < GltfNodeBase > Children { get ; }
257
267
}
258
268
269
+ [ Serializable ]
259
270
public abstract class GltfSceneBase {
260
271
public Dictionary < string , string > extras ;
261
272
0 commit comments