Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Commit 1077fb3

Browse files
author
DaZombieKiller
committed
Output error message when plugins folder not found
1 parent ea0ebd5 commit 1077fb3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Source/PluginManager/PluginManager.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ private static void LoadPlugins()
4444
{
4545
if (_types != null) _types.Clear();
4646
else _types = new List<Type>();
47-
47+
4848
if (Directory.Exists("./Plugins"))
4949
foreach (var path in Directory.GetFiles("./Plugins", "*.dll"))
5050
{
5151
try
5252
{
5353
// load plugin
5454
var module = Assembly.LoadFile(path);
55-
55+
5656
// search for behaviours
5757
foreach (var type in module.GetTypes())
5858
{
@@ -68,6 +68,11 @@ private static void LoadPlugins()
6868
Debug.LogErrorFormat("Bad plugin: {0}", path);
6969
}
7070
}
71+
else
72+
{
73+
Debug.LogErrorFormat("Couldn't find plugins folder: {0}",
74+
Path.Combine(Directory.GetCurrentDirectory(), "Plugins"));
75+
}
7176

7277
foreach (var t in _types)
7378
{

0 commit comments

Comments
 (0)