Skip to content

Instantly share code, notes, and snippets.

@luxuia
Created December 16, 2019 03:30
Show Gist options
  • Save luxuia/402fce831be253c07fd9e3e9063bb7ba to your computer and use it in GitHub Desktop.
Save luxuia/402fce831be253c07fd9e3e9063bb7ba to your computer and use it in GitHub Desktop.
材质格式从 [prop_name]: value 转成 -first: name:prop_name second value: xxx
- (.*):\n m_Texture: (.*)
- first:\n name: $1\n second:\n m_Texture: $2
find . -type f -name '*.prefab' -exec sed -i '' -e 's/m_IsPrefabAsset/m_IsPrefabParent/g' {} \;
find . -type f -name '*.unity' -exec sed -i '' -e 's/m_IsPrefabAsset/m_IsPrefabParent/g' {} \;
find . -type f -name '*.unity' -exec sed -i '' -e 's/m_SourcePrefab/m_ParentPrefab/g' {} \;
"serializedVersion: 6" => "serializedVersion: 5"
"m_CorrespondingSourceObject" => "m_PrefabParentObject"
"m_IsPrefabAsset" => "m_IsPrefabParent"
"m_SourcePrefab" => "m_ParentPrefab"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment