Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
AssetImport.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 using System;
4 using System.ComponentModel;
5 using SiliconStudio.Core;
6 using SiliconStudio.Core.IO;
7 
8 namespace SiliconStudio.Assets
9 {
10  /// <summary>
11  /// An importable asset.
12  /// </summary>
13  [DataContract]
14  public abstract class AssetImport : Asset
15  {
16  /// <summary>
17  /// Gets or sets the source file of this
18  /// </summary>
19  /// <value>The source.</value>
20  /// <userdoc>
21  /// The source file of this asset.
22  /// </userdoc>
23  [DataMember(-50)]
24  [DefaultValue(null)]
25  public UFile Source { get; set; }
26 
27  /// <summary>
28  /// Gets or sets id of the importer used.
29  /// </summary>
30  /// <value>The id of the importer.</value>
31  [DataMember(-40)]
32  [DefaultValue(null)]
33  [Browsable(false)]
34  public Guid? ImporterId { get; set; }
35 
36  internal AssetImport GetRootBase()
37  {
38  if (Base != null && Base.Asset is AssetImport && Base.Id == Guid.Empty)
39  {
40  return (AssetImport)Base.Asset;
41  }
42  return null;
43  }
44 
45  virtual internal void SetAsRootImport()
46  {
47  Id = Guid.Empty;
48  Source = null;
49  }
50  }
51 }
Base class for Asset.
Definition: Asset.cs:14
An importable asset.
Definition: AssetImport.cs:14
Defines a normalized file path. See UPath for details. This class cannot be inherited.
Definition: UFile.cs:13