-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49844ba
commit 27dfa06
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using nadena.dev.build_framework; | ||
using nadena.dev.modular_avatar.editor.ErrorReporting; | ||
|
||
namespace nadena.dev.modular_avatar.core.editor | ||
{ | ||
internal class ModularAvatarContext : IExtensionContext | ||
{ | ||
private IDisposable toDispose; | ||
internal BuildContext BuildContext { get; private set; } | ||
|
||
public void OnActivate(build_framework.BuildContext context) | ||
{ | ||
if (BuildContext == null) | ||
{ | ||
BuildContext = new BuildContext(context); | ||
} | ||
|
||
toDispose = BuildReport.CurrentReport.ReportingOnAvatar(context.AvatarDescriptor); | ||
} | ||
|
||
public void OnDeactivate(build_framework.BuildContext context) | ||
{ | ||
toDispose?.Dispose(); | ||
toDispose = null; | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.