public void Initialize(EntitasPreferencesConfig config) { _visualDebuggingConfig = new VisualDebuggingConfig(config); _scriptingDefineSymbols = new ScriptingDefineSymbols(); _enableVisualDebugging = !_scriptingDefineSymbols.buildTargetToDefSymbol.Values .All <string>(defs => defs.Contains(ENTITAS_DISABLE_VISUAL_DEBUGGING)); }
public void Initialize(EntitasPreferencesConfig config) { _visualDebuggingConfig = new VisualDebuggingConfig(config); _scriptingDefineSymbols = new ScriptingDefineSymbols(); _enableVisualDebugging = !_scriptingDefineSymbols.buildTargetToDefSymbol.Values .All<string>(defs => defs.Contains(ENTITAS_DISABLE_VISUAL_DEBUGGING)); }
static EntitasHierarchyIcon() { EditorApplication.hierarchyWindowItemOnGUI += onHierarchyWindowItemOnGUI; var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig()); _systemWarningThreshold = int.Parse(config.systemWarningThreshold); }
static void generateIDefaultInstanceCreator(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig()); var folder = config.defaultInstanceCreatorFolderPath; var filePath = folder + "Default_type_InstanceCreator.cs"; var template = string.Format(DEFAULT_INSTANCE_CREATOR_TEMPLATE_FORMAT, typeName); generateTemplate(folder, filePath, template); }
static void generateITypeDrawer(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferencesEditor.LoadConfig()); var folder = config.typeDrawerFolderPath; var filePath = folder + "Type_TypeDrawer.cs"; var template = string.Format(typeDrawerTemplateFormat, typeName); generateTemplate(folder, filePath, template); }
static void generateIDefaultInstanceCreator(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferencesEditor.LoadConfig()); var folder = config.defaultInstanceCreatorFolderPath; var filePath = folder + "Default_type_InstanceCreator.cs"; var template = string.Format(defaultInstanceCreatorTemplateFormat, typeName); generateTemplate(folder, filePath, template); }
static void generateITypeDrawer(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig()); var folder = config.typeDrawerFolderPath; var filePath = folder + "Type_TypeDrawer.cs"; var template = string.Format(TYPE_DRAWER_TEMPLATE_FORMAT, typeName); generateTemplate(folder, filePath, template); }
static void generateITypeDrawer(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig()); var folder = config.typeDrawerFolderPath; var filePath = folder + typeName.ShortTypeName() + "TypeDrawer.cs"; var template = TYPE_DRAWER_TEMPLATE_FORMAT .Replace("${Type}", typeName) .Replace("${ShortType}", typeName.ShortTypeName()); generateTemplate(folder, filePath, template); }
static void generateIDefaultInstanceCreator(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig()); var folder = config.defaultInstanceCreatorFolderPath; var filePath = folder + "Default" + typeName.ShortTypeName() + "InstanceCreator.cs"; var template = DEFAULT_INSTANCE_CREATOR_TEMPLATE_FORMAT .Replace("${Type}", typeName) .Replace("${ShortType}", typeName.ShortTypeName()); generateTemplate(folder, filePath, template); }
public void Draw(EntitasPreferencesConfig config) { var visualDebuggingConfig = new VisualDebuggingConfig(config); EditorGUILayout.BeginVertical(GUI.skin.box); { EditorGUILayout.LabelField("VisualDebugging", EditorStyles.boldLabel); visualDebuggingConfig.defaultInstanceCreatorFolderPath = EditorGUILayout.TextField("DefaultInstanceCreator Folder", visualDebuggingConfig.defaultInstanceCreatorFolderPath); visualDebuggingConfig.typeDrawerFolderPath = EditorGUILayout.TextField("TypeDrawer Folder", visualDebuggingConfig.typeDrawerFolderPath); } EditorGUILayout.EndVertical(); }
public void Draw(EntitasPreferencesConfig config) { var visualDebuggingConfig = new VisualDebuggingConfig(config); EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.LabelField("VisualDebugging", EditorStyles.boldLabel); visualDebuggingConfig.defaultInstanceCreatorFolderPath = EditorGUILayout.TextField("DefaultInstanceCreator Folder", visualDebuggingConfig.defaultInstanceCreatorFolderPath); visualDebuggingConfig.typeDrawerFolderPath = EditorGUILayout.TextField("TypeDrawer Folder", visualDebuggingConfig.typeDrawerFolderPath); EditorGUILayout.HelpBox("Specify the folder where to save generated templates.", MessageType.Info); EditorGUILayout.EndVertical(); }
public void Draw(EntitasPreferencesConfig config) { var visualDebuggingConfig = new VisualDebuggingConfig(config); EditorGUILayout.BeginVertical(GUI.skin.box); { EditorGUILayout.LabelField("VisualDebugging", EditorStyles.boldLabel); visualDebuggingConfig.defaultInstanceCreatorFolderPath = EditorGUILayout.TextField("DefaultInstanceCreator Folder", visualDebuggingConfig.defaultInstanceCreatorFolderPath); visualDebuggingConfig.typeDrawerFolderPath = EditorGUILayout.TextField("TypeDrawer Folder", visualDebuggingConfig.typeDrawerFolderPath); } EditorGUILayout.EndVertical(); }
public void Draw(EntitasPreferencesConfig config) { var visualDebuggingConfig = new VisualDebuggingConfig(config); EditorGUILayout.BeginVertical(GUI.skin.box); EditorGUILayout.LabelField("VisualDebugging", EditorStyles.boldLabel); visualDebuggingConfig.defaultInstanceCreatorFolderPath = EditorGUILayout.TextField("DefaultInstanceCreator Folder", visualDebuggingConfig.defaultInstanceCreatorFolderPath); visualDebuggingConfig.typeDrawerFolderPath = EditorGUILayout.TextField("TypeDrawer Folder", visualDebuggingConfig.typeDrawerFolderPath); EditorGUILayout.HelpBox("Specify the folder where to save generated templates.", MessageType.Info); EditorGUILayout.EndVertical(); }
void when_creating_config() { it["creates config from EntitasPreferencesConfig"] = () => { var config = new VisualDebuggingConfig(new EntitasPreferencesConfig(configString)); config.defaultInstanceCreatorFolderPath.should_be("path/to/folder/"); config.typeDrawerFolderPath.should_be("path/to/otherFolder/"); }; it["gets default values when keys dont exist"] = () => { var config = new VisualDebuggingConfig(new EntitasPreferencesConfig(string.Empty)); config.defaultInstanceCreatorFolderPath.should_be("Assets/Editor/DefaultInstanceCreator/"); config.typeDrawerFolderPath.should_be("Assets/Editor/TypeDrawer/"); }; it["sets values"] = () => { var config = new VisualDebuggingConfig(new EntitasPreferencesConfig(configString)); config.defaultInstanceCreatorFolderPath = "new/path/"; config.typeDrawerFolderPath = "new/otherPath/"; config.defaultInstanceCreatorFolderPath.should_be("new/path/"); config.typeDrawerFolderPath.should_be("new/otherPath/"); }; it["gets string"] = () => { var config = new VisualDebuggingConfig(new EntitasPreferencesConfig(configString)); config.defaultInstanceCreatorFolderPath = "new/path/"; config.typeDrawerFolderPath = "new/otherPath/"; config.ToString().should_be( "Entitas.Unity.VisualDebugging.DefaultInstanceCreatorFolderPath = new/path/\n" + "Entitas.Unity.VisualDebugging.TypeDrawerFolderPath = new/otherPath/\n"); }; it["gets string from empty config"] = () => { var config = new VisualDebuggingConfig(new EntitasPreferencesConfig(string.Empty)); config.ToString().should_be( "Entitas.Unity.VisualDebugging.DefaultInstanceCreatorFolderPath = Assets/Editor/DefaultInstanceCreator/\n" + "Entitas.Unity.VisualDebugging.TypeDrawerFolderPath = Assets/Editor/TypeDrawer/\n"); }; }
static void generateIDefaultInstanceCreator(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferencesEditor.LoadConfig()); var folder = config.defaultInstanceCreatorFolderPath; var filePath = folder + "Default_type_InstanceCreator.cs"; var template = string.Format(defaultInstanceCreatorTemplateFormat, typeName); generateTemplate(folder, filePath, template); }
public void Initialize(EntitasPreferencesConfig config) { _visualDebuggingConfig = new VisualDebuggingConfig(config); }
static void generateIDefaultInstanceCreator(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig()); var folder = config.defaultInstanceCreatorFolderPath; var filePath = folder + "Default_type_InstanceCreator.cs"; var template = string.Format(DEFAULT_INSTANCE_CREATOR_TEMPLATE_FORMAT, typeName); generateTemplate(folder, filePath, template); }
static void generateITypeDrawer(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferencesEditor.LoadConfig()); var folder = config.typeDrawerFolderPath; var filePath = folder + "Type_TypeDrawer.cs"; var template = string.Format(typeDrawerTemplateFormat, typeName); generateTemplate(folder, filePath, template); }
static void generateITypeDrawer(string typeName) { var config = new VisualDebuggingConfig(EntitasPreferences.LoadConfig()); var folder = config.typeDrawerFolderPath; var filePath = folder + "Type_TypeDrawer.cs"; var template = string.Format(TYPE_DRAWER_TEMPLATE_FORMAT, typeName); generateTemplate(folder, filePath, template); }
public void Initialize(EntitasPreferencesConfig config) { _visualDebuggingConfig = new VisualDebuggingConfig(config); }