mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add Unity3D Metadata files as generated
This commit is contained in:
@@ -68,6 +68,7 @@ module Linguist
|
||||
generated_protocol_buffer_go? ||
|
||||
generated_protocol_buffer? ||
|
||||
generated_jni_header? ||
|
||||
generated_unity3d_meta? ||
|
||||
vcr_cassette?
|
||||
end
|
||||
|
||||
@@ -311,5 +312,18 @@ module Linguist
|
||||
return false unless lines.count > 1
|
||||
return lines[0].include?("Generated by Cython")
|
||||
end
|
||||
|
||||
# Internal: Is this a metadata file from Unity3D?
|
||||
#
|
||||
# Unity3D Meta files start with:
|
||||
# fileFormatVersion: X
|
||||
# guid: XXXXXXXXXXXXXXX
|
||||
#
|
||||
# Return true or false
|
||||
def generated_unity3d_meta?
|
||||
return false unless extname == '.meta'
|
||||
return false unless lines.count > 1
|
||||
return lines[0].include?("fileFormatVersion: ")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3299,6 +3299,14 @@ Unity3D Asset:
|
||||
- .unity
|
||||
tm_scope: source.yaml
|
||||
|
||||
Unity3D Metadata:
|
||||
type: data
|
||||
ace_mode: yaml
|
||||
color: "#36093d"
|
||||
extensions:
|
||||
- .meta
|
||||
tm_scope: source.yaml
|
||||
|
||||
UnrealScript:
|
||||
type: programming
|
||||
color: "#a54c4d"
|
||||
|
||||
Reference in New Issue
Block a user