Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
EntityAsset.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 
4 using SiliconStudio.Assets;
5 using SiliconStudio.Assets.Compiler;
6 using SiliconStudio.Core;
7 using SiliconStudio.Paradox.EntityModel.Data;
8 
9 namespace SiliconStudio.Paradox.Assets.Model
10 {
11  [DataContract("Entity")]
12  [AssetFileExtension(FileExtension)]
13  [AssetCompiler(typeof(EntityAssetCompiler))]
14  [ThumbnailCompiler(PreviewerCompilerNames.EntityThumbnailCompilerQualifiedName)]
15  [AssetFactory(typeof(EntityFactory))]
16  [AssetDescription("Entity", "An entity", true)]
17  public class EntityAsset : Asset
18  {
19  /// <summary>
20  /// The default file extension used by the <see cref="EntityAsset"/>.
21  /// </summary>
22  public const string FileExtension = ".pdxentity";
23 
24  public EntityAsset()
25  {
26  Data = new EntityData();
27  }
28 
29  // Not used in current version but later it should allow extracting lights, cameras, etc... as children entities.
30  // Or maybe it would be better as separate LightsAsset and CamerasAsset?
31  //[DataMember(10)]
32  //public UPath Source { get; set; }
33 
34  /// <summary>
35  /// Gets or sets the data.
36  /// </summary>
37  /// <value>
38  /// The data.
39  /// </value>
40  [DataMember(20)]
41  public EntityData Data { get; set; }
42 
43  private class EntityFactory : IAssetFactory
44  {
45  public Asset New()
46  {
47  return new EntityAsset();
48  }
49  }
50  }
51 }
Base class for Asset.
Definition: Asset.cs:14
Interface to create default instance of an asset type.
Definition: IAssetFactory.cs:8
Data type for SiliconStudio.Paradox.EntityModel.Entity.
Definition: EngineData.cs:739
Contains user-friendly names and descriptions of an asset type.