Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static void OpenDocumentation()
[MenuItem("GameObject/Zenject/Scene Context", false, 9)]
public static void CreateSceneContext(MenuCommand menuCommand)
{
var root = new GameObject("SceneContext").AddComponent<SceneContext>();
var root = ObjectFactory.CreateGameObject("SceneContext", typeof(SceneContext));
Selection.activeGameObject = root.gameObject;

EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
Expand All @@ -43,7 +43,7 @@ public static void CreateSceneContext(MenuCommand menuCommand)
[MenuItem("GameObject/Zenject/Decorator Context", false, 9)]
public static void CreateDecoratorContext(MenuCommand menuCommand)
{
var root = new GameObject("DecoratorContext").AddComponent<SceneDecoratorContext>();
var root = ObjectFactory.CreateGameObject("DecoratorContext", typeof(SceneDecoratorContext));
Selection.activeGameObject = root.gameObject;

EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
Expand All @@ -52,7 +52,7 @@ public static void CreateDecoratorContext(MenuCommand menuCommand)
[MenuItem("GameObject/Zenject/Game Object Context", false, 9)]
public static void CreateGameObjectContext(MenuCommand menuCommand)
{
var root = new GameObject("GameObjectContext").AddComponent<GameObjectContext>();
var root = ObjectFactory.CreateGameObject("GameObjectContext", typeof(GameObjectContext));
Selection.activeGameObject = root.gameObject;

EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
Expand Down