<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
		<id>https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Unity%2FDI%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF%2FExtenject%2FProjectContext</id>
		<title>Unity/DIフレームワーク/Extenject/ProjectContext - 変更履歴</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Unity%2FDI%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF%2FExtenject%2FProjectContext"/>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Unity/DI%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF/Extenject/ProjectContext&amp;action=history"/>
		<updated>2026-04-19T06:09:17Z</updated>
		<subtitle>このウィキのこのページに関する変更履歴</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>https://wiki.nonip.net/index.php?title=Unity/DI%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF/Extenject/ProjectContext&amp;diff=17903&amp;oldid=prev</id>
		<title>Admin: /* サンプル */</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Unity/DI%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF/Extenject/ProjectContext&amp;diff=17903&amp;oldid=prev"/>
				<updated>2023-11-15T03:29:35Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;サンプル&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←前の版&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2023年11月15日 (水) 03:29時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;行25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; Container&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; Container&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; .Bind&amp;lt;ProjectContextLogic&amp;gt;()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; .Bind&amp;lt;ProjectContextLogic&amp;gt;()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; .To&amp;lt;ProjectContextLogic&amp;gt;()&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; .AsTransient();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; .AsTransient();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>https://wiki.nonip.net/index.php?title=Unity/DI%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF/Extenject/ProjectContext&amp;diff=17901&amp;oldid=prev</id>
		<title>Admin: ページの作成:「==ProjectContextとは== 全共通して使えるSceneContext  参考：https://www.subarunari.com/entry/2018/01/08/024341  ==準備== #Edit/Zenject/CreateProjectContext...」</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Unity/DI%E3%83%95%E3%83%AC%E3%83%BC%E3%83%A0%E3%83%AF%E3%83%BC%E3%82%AF/Extenject/ProjectContext&amp;diff=17901&amp;oldid=prev"/>
				<updated>2023-11-14T20:23:07Z</updated>
		
		<summary type="html">&lt;p&gt;ページの作成:「==ProjectContextとは== 全共通して使えるSceneContext  参考：https://www.subarunari.com/entry/2018/01/08/024341  ==準備== #Edit/Zenject/CreateProjectContext...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==ProjectContextとは==&lt;br /&gt;
全共通して使えるSceneContext&lt;br /&gt;
&lt;br /&gt;
参考：https://www.subarunari.com/entry/2018/01/08/024341&lt;br /&gt;
&lt;br /&gt;
==準備==&lt;br /&gt;
#Edit/Zenject/CreateProjectContextで、Project内の、Resources直下に、ProjectContextを作られる&lt;br /&gt;
#適当なInstaller(以下例ではProjectContextInstaller)を作り、Prefab化したGameObjectにAddComponentしておく。&lt;br /&gt;
#ProjectContextのPrefabInstallersに、上記Installerを追加する。&lt;br /&gt;
#ヒエラルキー上に、SceneContextを作っておく。&lt;br /&gt;
&lt;br /&gt;
==サンプル==&lt;br /&gt;
ProjectContextInstaller.cs&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
using Zenject;&lt;br /&gt;
using System;&lt;br /&gt;
&lt;br /&gt;
public class ProjectContextInstaller : MonoInstaller&lt;br /&gt;
{&lt;br /&gt;
    public override void InstallBindings()&lt;br /&gt;
    {&lt;br /&gt;
        Container&lt;br /&gt;
            .Bind&amp;lt;ProjectContextLogic&amp;gt;()&lt;br /&gt;
            .To&amp;lt;ProjectContextLogic&amp;gt;()&lt;br /&gt;
            .AsTransient();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProjectContextLogic.cs&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
&lt;br /&gt;
public class ProjectContextLogic : ILogic&lt;br /&gt;
{&lt;br /&gt;
    public bool Exec()&lt;br /&gt;
    {&lt;br /&gt;
        Debug.Log(&amp;quot;ProjectContextLogic Exec&amp;quot;);&lt;br /&gt;
        return true;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProjectContextMain.cs&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
using Zenject;&lt;br /&gt;
&lt;br /&gt;
public class ProjectContextMain : MonoBehaviour&lt;br /&gt;
{&lt;br /&gt;
    [Inject] ProjectContextLogic _logic;&lt;br /&gt;
    void Start()&lt;br /&gt;
    {&lt;br /&gt;
        _logic.Exec();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ProjectContextMainを追加したシーンでは、&amp;quot;ProjectContextLogic Exec&amp;quot;とログが表示され、追加してないシーンでは、ProjectContextが作られるが、ログは出ない。&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>