Class ContentImportingModule
Imports assets and other resources to the project. Provides per asset import settings editing.
Inheritance
Namespace: FlaxEditor.Modules
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class ContentImportingModule : EditorModule
Properties
ImportBatchDone
Gets the amount of files done in the current import batch.
Declaration
public float ImportBatchDone { get; }
Property Value
System.Single
|
ImportBatchSize
Gets the size of the current import batch (imported files + files to import left).
Declaration
public int ImportBatchSize { get; }
Property Value
System.Int32
|
ImportingProgress
Gets the importing assets progress.
Declaration
public float ImportingProgress { get; }
Property Value
System.Single
|
IsImporting
Gets a value indicating whether this instance is importing assets.
Declaration
public bool IsImporting { get; }
Property Value
System.Boolean
|
Methods
add_ImportFileEnd(ContentImportingModule.ImportFileEndDelegate)
Declaration
public void add_ImportFileEnd(ContentImportingModule.ImportFileEndDelegate value)
Parameters
ContentImportingModule.ImportFileEndDelegate
value
|
Create(CreateFileEntry)
Creates the specified file entry (can show create settings dialog if needed).
Declaration
public void Create(CreateFileEntry entry)
Parameters
CreateFileEntry
entry
The entry. |
Import(IEnumerable<String>, ContentFolder, Boolean)
Imports the specified files.
Declaration
public void Import(IEnumerable<string> files, ContentFolder targetLocation, bool skipSettingsDialog = false)
Parameters
System.Collections.Generic.IEnumerable<System.String>
files
The files. |
FlaxEditor.Content.ContentFolder
targetLocation
The target location. |
System.Boolean
skipSettingsDialog
True if skip any popup dialogs showing for import options adjusting. Can be used when importing files from code. |
Import(String, ContentFolder, Boolean, Object)
Imports the specified file.
Declaration
public void Import(string file, ContentFolder targetLocation, bool skipSettingsDialog = false, object settings = null)
Parameters
System.String
file
The file. |
FlaxEditor.Content.ContentFolder
targetLocation
The target location. |
System.Boolean
skipSettingsDialog
True if skip any popup dialogs showing for import options adjusting. Can be used when importing files from code. |
System.Object
settings
Import settings to override. Use null to skip this value. |
OnExit()
Declaration
public override void OnExit()
Overrides
OnInit()
Declaration
public override void OnInit()
Overrides
OnUpdate()
Declaration
public override void OnUpdate()
Overrides
Reimport(BinaryAssetItem, Object, Boolean)
Reimports the specified BinaryAssetItem item.
Declaration
public void Reimport(BinaryAssetItem item, object settings = null, bool skipSettingsDialog = false)
Parameters
BinaryAssetItem
item
The item. |
System.Object
settings
The import settings to override. |
System.Boolean
skipSettingsDialog
True if skip any popup dialogs showing for import options adjusting. Can be used when importing files from code. |
remove_ImportFileEnd(ContentImportingModule.ImportFileEndDelegate)
Declaration
public void remove_ImportFileEnd(ContentImportingModule.ImportFileEndDelegate value)
Parameters
ContentImportingModule.ImportFileEndDelegate
value
|
ShowImportFileDialog(ContentFolder)
Shows the dialog for selecting files to import.
Declaration
public void ShowImportFileDialog(ContentFolder targetLocation)
Parameters
FlaxEditor.Content.ContentFolder
targetLocation
The target location. |
Events
ImportFileBegin
Occurs when file is being imported. Can be called on non-main thread.
Declaration
public event Action<IFileEntryAction> ImportFileBegin
Event Type
System.Action<FlaxEditor.Content.IFileEntryAction>
|
ImportFileEnd
Occurs when file importing end. Can be called on non-main thread.
Declaration
public event ContentImportingModule.ImportFileEndDelegate ImportFileEnd
Event Type
ContentImportingModule.ImportFileEndDelegate
|
ImportingQueueBegin
Occurs when assets importing starts.
Declaration
public event Action ImportingQueueBegin
Event Type
System.Action
|
ImportingQueueEnd
Occurs when assets importing ends. Can be called on non-main thread.
Declaration
public event Action ImportingQueueEnd
Event Type
System.Action
|