/*============================================================================*/ /* Public Functions */ /*============================================================================*/ public override void OnInspectorGUI() { EditorGUILayout.LabelField("View", mediatorAttach.View.GetType().Name); foreach (object mediator in mediatorAttach.Mediators) { MonoScript ms = MonoScriptCacher.GetMonoScript(mediator.GetType()); if (ms != null) { EditorGUILayout.ObjectField("Mediator", ms, typeof(MonoScript), false); } else { EditorGUILayout.LabelField("Mediator", mediator.GetType().Name); } } }
/*============================================================================*/ /* Public Functions */ /*============================================================================*/ public override void OnInspectorGUI() { foreach (KeyValuePair <MappingId, object> kvp in unitySingletons.Factory.SingletonInstances) { string label = kvp.Key.type.Name; if (kvp.Key.key != null) { label += ": " + kvp.Key.key.ToString(); } MonoScript ms = MonoScriptCacher.GetMonoScript(kvp.Value.GetType()); if (ms != null) { EditorGUILayout.ObjectField(label, MonoScriptCacher.GetMonoScript(kvp.Value.GetType()), typeof(MonoScript), false); } else { EditorGUILayout.LabelField(label, kvp.Value.GetType().Name); } } }