From 27dfa0626b6031ac35094ee6d16731a35a0c7958 Mon Sep 17 00:00:00 2001 From: bd_ Date: Tue, 22 Aug 2023 18:39:03 +0900 Subject: [PATCH] add missing files --- .../PluginDefinition/ModularAvatarContext.cs | 28 +++++++++++++++++++ .../ModularAvatarContext.cs.meta | 3 ++ 2 files changed, 31 insertions(+) create mode 100644 Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs create mode 100644 Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs.meta diff --git a/Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs b/Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs new file mode 100644 index 000000000..2cb5fd7f2 --- /dev/null +++ b/Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs @@ -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; + } + } +} \ No newline at end of file diff --git a/Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs.meta b/Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs.meta new file mode 100644 index 000000000..fbe30f5bb --- /dev/null +++ b/Packages/nadena.dev.modular-avatar/Editor/PluginDefinition/ModularAvatarContext.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2be0ae3b99ac44c0a35522d7fd0c6f10 +timeCreated: 1692614275 \ No newline at end of file