diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8d5ed3d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,76 @@ +# ============================================================ +# Unity 项目 .gitattributes +# 行尾统一为 LF,二进制资源禁止转换,Unity YAML 走专用合并 +# ============================================================ + +# 默认按文本处理,自动识别 +* text=auto + +# --- Unity YAML 资源 --- +*.unity text eol=lf +*.prefab text eol=lf +*.asset text eol=lf +*.meta text eol=lf +*.mat text eol=lf +*.controller text eol=lf +*.anim text eol=lf +*.playable text eol=lf +*.mask text eol=lf +*.physicMaterial text eol=lf +*.physicsMaterial2D text eol=lf +*.asmdef text eol=lf +*.asmref text eol=lf +*.json text eol=lf + +# --- 代码 / 着色器 / UI --- +*.cs text eol=lf +*.shader text eol=lf +*.hlsl text eol=lf +*.cginc text eol=lf +*.compute text eol=lf +*.uxml text eol=lf +*.uss text eol=lf + +# --- 二进制资源 --- +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.psd binary +*.tga binary +*.tif binary +*.exr binary +*.hdr binary +*.bmp binary +*.fbx binary +*.obj binary +*.blend binary +*.3ds binary +*.dae binary +*.wav binary +*.mp3 binary +*.ogg binary +*.aiff binary +*.mp4 binary +*.mov binary +*.webm binary +*.dll binary +*.so binary +*.dylib binary +*.a binary +*.bundle binary +*.unitypackage binary +*.apk binary +*.aab binary +*.app binary +*.keystore binary +*.jks binary +*.p12 binary + +# --- Unity YAML 冲突走 UnityYAMLMerge --- +*.unity merge=unityyamlmerge +*.prefab merge=unityyamlmerge +*.asset merge=unityyamlmerge +*.meta merge=unityyamlmerge +*.controller merge=unityyamlmerge +*.anim merge=unityyamlmerge