EDIT: this is an old post and a lof the information in this document is outdated.
Git is a popular free and open source distributed version control system.
I am new to Unity, but as a long time git user, I wanted to use git for my
# IDE configurations containing my preferred coding convensions for C# | |
[*] | |
charset = utf-8 | |
end_of_line = crlf | |
trim_trailing_whitespace = false | |
insert_final_newline = false | |
indent_style = space | |
indent_size = 4 |
# Top most EditorConfig file | |
root=true | |
######################### JSON, PowerShell, Shell scripts, CSProj (XML), and Config (XML) files ######################### | |
[*.{json,ps1,sh,csproj,config}] | |
######################### Core EditorConfig Options ######################### | |
## https://editorconfig.org/ | |
# Indentation and spacing | |
indent_style = space | |
indent_size = 2 |
using System; | |
using System.Reflection; | |
using UnityEngine; | |
public static class AnimatorExtensions | |
{ | |
/// <summary>Gets an instance method with single argument of type <typeparamref | |
/// name="TArg0"/> and return type of <typeparamref name="TReturn"/> from <typeparamref | |
/// name="TThis"/> and compiles it into a fast open delegate.</summary> | |
/// <typeparam name="TThis">Type of the class owning the instance method.</typeparam> |
using UnityEngine; | |
using System.Collections; | |
using System; | |
//based on the code in this post: http://martinecker.com/martincodes/unity-editor-window-zooming/ | |
//but I changed how the API works and made it much more flexible | |
//usage: create an EditorZoomer instance wherever you want to use it (it tracks the pan + zoom state) | |
//in your OnGUI, draw your scrollable content between zoomer.Begin() and zoomer.End(); | |
//you also must offset your content by zoomer.GetContentOffset(); |
* text=auto | |
# Unity files | |
*.meta -text -merge=unityamlmerge | |
*.unity -text -merge=unityamlmerge | |
*.asset -text -merge=unityamlmerge | |
*.prefab -text -merge=unityamlmerge | |
# Image formats | |
*.psd filter=lfs diff=lfs merge=lfs -text |
/******************************************************************************* | |
* Don't Be a Jerk: The Open Source Software License. | |
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk | |
******************************************************************************* | |
* _I_ am the software author - JohannesMP on Github. | |
* _You_ are the user of this software. You might be a _we_, and that's OK! | |
* | |
* This is free, open source software. I will never charge you to use, | |
* license, or obtain this software. Doing so would make me a jerk. | |
* |
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class MinMaxAttribute : PropertyAttribute | |
{ | |
public float MinLimit = 0; | |
public float MaxLimit = 1; | |
public bool ShowEditRange; | |
public bool ShowDebugValues; |
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class ReadOnlyAttribute : PropertyAttribute { } |
## Unity ## | |
*.cs diff=csharp text | |
*.cginc text | |
*.shader text | |
*.mat merge=unityyamlmerge eol=lf | |
*.anim merge=unityyamlmerge eol=lf | |
*.unity merge=unityyamlmerge eol=lf | |
*.prefab merge=unityyamlmerge eol=lf |
EDIT: this is an old post and a lof the information in this document is outdated.
Git is a popular free and open source distributed version control system.
I am new to Unity, but as a long time git user, I wanted to use git for my