Initial Commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
#if !ODIN_INSPECTOR
|
||||
|
||||
namespace Zenject
|
||||
{
|
||||
[NoReflectionBaking]
|
||||
public class ContextEditor : UnityInspectorListEditor
|
||||
{
|
||||
protected override string[] PropertyNames
|
||||
{
|
||||
get
|
||||
{
|
||||
return new string[]
|
||||
{
|
||||
"_scriptableObjectInstallers",
|
||||
"_monoInstallers",
|
||||
"_installerPrefabs",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
protected override string[] PropertyDisplayNames
|
||||
{
|
||||
get
|
||||
{
|
||||
return new string[]
|
||||
{
|
||||
"Scriptable Object Installers",
|
||||
"Mono Installers",
|
||||
"Prefab Installers",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
protected override string[] PropertyDescriptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return new string[]
|
||||
{
|
||||
"Drag any assets in your Project that implement ScriptableObjectInstaller here",
|
||||
"Drag any MonoInstallers that you have added to your Scene Hierarchy here.",
|
||||
"Drag any prefabs that contain a MonoInstaller on them here",
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23155ecdf203bf24480fd49763b73677
|
||||
timeCreated: 1461708049
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
#if !ODIN_INSPECTOR
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace Zenject
|
||||
{
|
||||
[CustomEditor(typeof(GameObjectContext))]
|
||||
[NoReflectionBaking]
|
||||
public class GameObjectContextEditor : RunnableContextEditor
|
||||
{
|
||||
SerializedProperty _kernel;
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
_kernel = serializedObject.FindProperty("_kernel");
|
||||
}
|
||||
|
||||
protected override void OnGui()
|
||||
{
|
||||
base.OnGui();
|
||||
|
||||
EditorGUILayout.PropertyField(_kernel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0873c763efd1e94fb3a56ff80843cf1
|
||||
timeCreated: 1461708052
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,38 @@
|
||||
#if !ODIN_INSPECTOR
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace Zenject
|
||||
{
|
||||
[CustomEditor(typeof(ProjectContext))]
|
||||
[NoReflectionBaking]
|
||||
public class ProjectContextEditor : ContextEditor
|
||||
{
|
||||
SerializedProperty _settingsProperty;
|
||||
SerializedProperty _editorReflectionBakingCoverageModeProperty;
|
||||
SerializedProperty _buildsReflectionBakingCoverageModeProperty;
|
||||
SerializedProperty _parentNewObjectsUnderContextProperty;
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
_settingsProperty = serializedObject.FindProperty("_settings");
|
||||
_editorReflectionBakingCoverageModeProperty = serializedObject.FindProperty("_editorReflectionBakingCoverageMode");
|
||||
_buildsReflectionBakingCoverageModeProperty = serializedObject.FindProperty("_buildsReflectionBakingCoverageMode");
|
||||
_parentNewObjectsUnderContextProperty = serializedObject.FindProperty("_parentNewObjectsUnderContext");
|
||||
}
|
||||
|
||||
protected override void OnGui()
|
||||
{
|
||||
base.OnGui();
|
||||
|
||||
EditorGUILayout.PropertyField(_settingsProperty, true);
|
||||
EditorGUILayout.PropertyField(_editorReflectionBakingCoverageModeProperty, true);
|
||||
EditorGUILayout.PropertyField(_buildsReflectionBakingCoverageModeProperty, true);
|
||||
EditorGUILayout.PropertyField(_parentNewObjectsUnderContextProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5ad40b612e67574aad508d053e6965b
|
||||
timeCreated: 1461708053
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,29 @@
|
||||
#if !ODIN_INSPECTOR
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace Zenject
|
||||
{
|
||||
[NoReflectionBaking]
|
||||
public class RunnableContextEditor : ContextEditor
|
||||
{
|
||||
SerializedProperty _autoRun;
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
_autoRun = serializedObject.FindProperty("_autoRun");
|
||||
}
|
||||
|
||||
protected override void OnGui()
|
||||
{
|
||||
base.OnGui();
|
||||
|
||||
EditorGUILayout.PropertyField(_autoRun);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02bed9738f9c4323ac05524465473dee
|
||||
timeCreated: 1494728675
|
||||
@@ -0,0 +1,37 @@
|
||||
#if !ODIN_INSPECTOR
|
||||
|
||||
using UnityEditor;
|
||||
|
||||
namespace Zenject
|
||||
{
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(SceneContext))]
|
||||
[NoReflectionBaking]
|
||||
public class SceneContextEditor : RunnableContextEditor
|
||||
{
|
||||
SerializedProperty _contractNameProperty;
|
||||
SerializedProperty _parentNamesProperty;
|
||||
SerializedProperty _parentNewObjectsUnderSceneContextProperty;
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
_contractNameProperty = serializedObject.FindProperty("_contractNames");
|
||||
_parentNamesProperty = serializedObject.FindProperty("_parentContractNames");
|
||||
_parentNewObjectsUnderSceneContextProperty = serializedObject.FindProperty("_parentNewObjectsUnderSceneContext");
|
||||
}
|
||||
|
||||
protected override void OnGui()
|
||||
{
|
||||
base.OnGui();
|
||||
|
||||
EditorGUILayout.PropertyField(_contractNameProperty, true);
|
||||
EditorGUILayout.PropertyField(_parentNamesProperty, true);
|
||||
EditorGUILayout.PropertyField(_parentNewObjectsUnderSceneContextProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c04ae1d59f53f514f96e284ba43122f7
|
||||
timeCreated: 1461708053
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
#if !ODIN_INSPECTOR
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using ModestTree;
|
||||
|
||||
namespace Zenject
|
||||
{
|
||||
[CustomEditor(typeof(SceneDecoratorContext))]
|
||||
[NoReflectionBaking]
|
||||
public class SceneDecoratorContextEditor : ContextEditor
|
||||
{
|
||||
SerializedProperty _decoratedContractNameProperty;
|
||||
|
||||
protected override string[] PropertyNames
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.PropertyNames.Concat(new string[]
|
||||
{
|
||||
"_lateInstallers",
|
||||
"_lateInstallerPrefabs",
|
||||
"_lateScriptableObjectInstallers"
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
protected override string[] PropertyDisplayNames
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.PropertyDisplayNames.Concat(new string[]
|
||||
{
|
||||
"Late Installers",
|
||||
"Late Prefab Installers",
|
||||
"Late Scriptable Object Installers"
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
protected override string[] PropertyDescriptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.PropertyDescriptions.Concat(new string[]
|
||||
{
|
||||
"Drag any MonoInstallers that you have added to your Scene Hierarchy here. They'll be installed after the target installs its bindings",
|
||||
"Drag any prefabs that contain a MonoInstaller on them here. They'll be installed after the target installs its bindings",
|
||||
"Drag any assets in your Project that implement ScriptableObjectInstaller here. They'll be installed after the target installs its bindings"
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
_decoratedContractNameProperty = serializedObject.FindProperty("_decoratedContractName");
|
||||
}
|
||||
|
||||
protected override void OnGui()
|
||||
{
|
||||
base.OnGui();
|
||||
|
||||
EditorGUILayout.PropertyField(_decoratedContractNameProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2b9289e80031104295e10acf518d75a
|
||||
timeCreated: 1461708053
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user