Skip to content

Commit b136f5c

Browse files
committed
EventManager Init
- Added class to store and handle Editor wide callbacks.
1 parent 2ac957c commit b136f5c

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
3+
public static class EventManager
4+
{
5+
public delegate void AssetManagerCallback();
6+
7+
/// <summary>Called after Rust Asset Bundles are loaded into the editor. </summary>
8+
public static event AssetManagerCallback BundlesLoaded;
9+
10+
/// <summary>Called after Rust Asset Bundles are unloaded from the editor. </summary>
11+
public static event AssetManagerCallback BundlesDisposed;
12+
13+
public static void OnBundlesLoaded() => BundlesLoaded.Invoke();
14+
15+
public static void OnBundlesDisposed() => BundlesDisposed.Invoke();
16+
}

Assets/MapEditor/Managers/EventManager.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)