-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResourcePlugin.cs
51 lines (45 loc) · 1.26 KB
/
ResourcePlugin.cs
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
using System;
using System.Collections.Generic;
using System.IO;
using FlaxEditor;
using FlaxEditor.Content;
using FlaxEditor.GUI;
using FlaxEngine;
namespace ResourcesPlugin.Source.Editor
{
public class ResourcePlugin : EditorPlugin
{
public override PluginDescription Description => new PluginDescription
{
Name = "Resource Auto Import Plugin",
Category = "Other",
Author = "Stefnotch",
AuthorUrl = null,
HomepageUrl = null,
//RepositoryUrl = "https://github.com./FlaxEngine/ExamplePlugin",
Description = "This is a Content/Resources folder auto importer.",
Version = new Version(1, 0),
IsAlpha = false,
IsBeta = false,
};
private AssetFolderSynchronizer _assetFolderSynchronizer;
public override void Initialize()
{
base.Initialize();
}
/// <inheritdoc />
public override void InitializeEditor()
{
base.InitializeEditor();
var rawAssetsPath = Path.Combine(Globals.ContentFolder, "..", "Assets");
var importedAssetsPath = Path.Combine(Globals.ContentFolder, "Imported");
_assetFolderSynchronizer = new AssetFolderSynchronizer(rawAssetsPath, importedAssetsPath, Editor);
}
/// <inheritdoc />
public override void Deinitialize()
{
_assetFolderSynchronizer?.Dispose();
base.Deinitialize();
}
}
}