Skip to content

Instantly share code, notes, and snippets.

@leodecm3
Created July 25, 2022 19:14
Show Gist options
  • Save leodecm3/8e4006c9e7184d3c22da20c4a379af72 to your computer and use it in GitHub Desktop.
Save leodecm3/8e4006c9e7184d3c22da20c4a379af72 to your computer and use it in GitHub Desktop.
My favorite Indentation config for Unity projects
# My favorite Indentation config for Unity projects
# By https://github.com/leodecm3
# Based on the Codemokey YouTube channel code preference https://www.youtube.com/c/CodeMonkeyUnity
#
# Exemple:
#
# using System.Collections;
# using System.Collections.Generic;
# using UnityEngine;
#
# [CreateAssetMenu(menuName = "ScriptableObjects/BuildingType")]
# public class BuildingTypeSO : ScriptableObject {
#
# public string nameString;
# public Transform prefab;
# public bool hasResourceGeneratorData;
# public ResourceGeneratorData resourceGeneratorData;
# public Sprite sprite;
# public float minConstructionRadius;
# public ResourceAmount[] constructionResourceCostArray;
# public int healthAmountMax;
# public float constructionTimerMax;
#
#
# public string GetConstructionResourceCostString() {
# string str = "";
# foreach (ResourceAmount resourceAmount in constructionResourceCostArray) {
# str += "<color=#" + resourceAmount.resourceType.colorHex + ">" +
# resourceAmount.resourceType.nameShort + resourceAmount.amount +
# "</color> ";
# }
# return str;
# }
#
# }
[*]
# Microsoft .NET properties
csharp_indent_braces = false
csharp_new_line_before_else = false
csharp_new_line_before_open_brace = control_blocks
csharp_style_var_elsewhere = false:suggestion
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:suggestion
# ReSharper properties
resharper_align_multiline_binary_expressions_chain = false
resharper_blank_lines_after_block_statements = 0
resharper_blank_lines_around_property = 0
resharper_braces_for_foreach = required
resharper_braces_for_ifelse = required_for_multiline_statement
resharper_cpp_insert_final_newline = false
resharper_csharp_blank_lines_around_invocable = 0
resharper_csharp_insert_final_newline = true
resharper_csharp_keep_blank_lines_in_declarations = 100
resharper_csharp_max_line_length = 168
resharper_csharp_other_braces = end_of_line
resharper_csharp_wrap_arguments_style = chop_if_long
resharper_instance_members_qualify_declared_in = base_class
resharper_object_creation_when_type_evident = explicitly_typed
resharper_parentheses_non_obvious_operations = none, bitwise, bitwise_inclusive_or, bitwise_exclusive_or, shift, multiplicative, bitwise_and
resharper_parentheses_redundancy_style = remove_if_not_clarifies_precedence
resharper_place_simple_anonymousmethod_on_single_line = false
resharper_place_simple_embedded_statement_on_same_line = true
resharper_remove_blank_lines_near_braces_in_declarations = false
resharper_trailing_comma_in_multiline_lists = true
resharper_wrap_after_dot_in_method_calls = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment