Semantic diffs for UnityYAML assets
PrefabLens shows semantic diffs in views like Unity's Hierarchy and Inspector. Use PrefabLens on GitHub pull requests, in the terminal, and in the Unity Editor.
Without PrefabLens
Robot.prefab
| @@ -10,7 +10,7 @@ GameObject: | ||
| 10 | 10 | m_Component: |
| 11 | 11 | - component: {fileID: 773946660032344633} |
| 12 | 12 | m_Layer: 0 |
| 13 | - m_Name: Head | |
| 13 | + m_Name: Sensor | |
| 14 | 14 | m_TagString: Untagged |
| 15 | 15 | m_Icon: {fileID: 0} |
| 16 | 16 | m_NavMeshLayer: 0 |
| @@ -25,7 +25,7 @@ Transform: | ||
| 25 | 25 | m_GameObject: {fileID: 5267583679722982000} |
| 26 | 26 | serializedVersion: 2 |
| 27 | 27 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} |
| 28 | - m_LocalPosition: {x: 0, y: 2, z: 0} | |
| 28 | + m_LocalPosition: {x: 0, y: 2.2, z: 0.1} | |
| 29 | 29 | m_LocalScale: {x: 1, y: 1, z: 1} |
| 30 | 30 | m_ConstrainProportionsScale: 0 |
| 31 | 31 | m_Children: [] |
| @@ -93,9 +93,9 @@ GameObject: | ||
| 93 | 93 | serializedVersion: 6 |
| 94 | 94 | m_Component: |
| 95 | 95 | - component: {fileID: 9003171066890524446} |
| 96 | - - component: {fileID: 3496157676355288704} | |
| 97 | 96 | - component: {fileID: 7524019088176543755} |
| 98 | 97 | - component: {fileID: 4382273337907184133} |
| 98 | + - component: {fileID: 5978502647804666025} | |
| 99 | 99 | m_Layer: 0 |
| 100 | 100 | m_Name: Robot |
| 101 | 101 | m_TagString: Untagged |
| @@ -120,27 +120,6 @@ Transform: | ||
| 120 | 120 | - {fileID: 773946660032344633} |
| 121 | 121 | m_Father: {fileID: 0} |
| 122 | 122 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
| 123 | ---- !u!65 &3496157676355288704 | |
| 124 | -BoxCollider: | |
| 125 | - m_ObjectHideFlags: 0 | |
| 126 | - m_CorrespondingSourceObject: {fileID: 0} | |
| 127 | - m_PrefabInstance: {fileID: 0} | |
| 128 | - m_PrefabAsset: {fileID: 0} | |
| 129 | - m_GameObject: {fileID: 7703008261286675462} | |
| 130 | - m_Material: {fileID: 0} | |
| 131 | - m_IncludeLayers: | |
| 132 | - serializedVersion: 2 | |
| 133 | - m_Bits: 0 | |
| 134 | - m_ExcludeLayers: | |
| 135 | - serializedVersion: 2 | |
| 136 | - m_Bits: 0 | |
| 137 | - m_LayerOverridePriority: 0 | |
| 138 | - m_IsTrigger: 0 | |
| 139 | - m_ProvidesContacts: 0 | |
| 140 | - m_Enabled: 1 | |
| 141 | - serializedVersion: 3 | |
| 142 | - m_Size: {x: 1, y: 2, z: 1} | |
| 143 | - m_Center: {x: 0, y: 0, z: 0} | |
| 144 | 123 | --- !u!54 &7524019088176543755 |
| 145 | 124 | Rigidbody: |
| 146 | 125 | m_ObjectHideFlags: 0 |
| @@ -149,7 +128,7 @@ Rigidbody: | ||
| 149 | 128 | m_PrefabAsset: {fileID: 0} |
| 150 | 129 | m_GameObject: {fileID: 7703008261286675462} |
| 151 | 130 | serializedVersion: 5 |
| 152 | - m_Mass: 5 | |
| 131 | + m_Mass: 12 | |
| 153 | 132 | m_LinearDamping: 0 |
| 154 | 133 | m_AngularDamping: 0.05 |
| 155 | 134 | m_CenterOfMass: {x: 0, y: 0, z: 0} |
| @@ -180,8 +159,31 @@ MonoBehaviour: | ||
| 180 | 159 | m_Script: {fileID: 11500000, guid: 703cbb55826be49d58e62cadc6597c6f, type: 3} |
| 181 | 160 | m_Name: |
| 182 | 161 | m_EditorClassIdentifier: Assembly-CSharp::FixtureBehaviour |
| 183 | - speed: 2.5 | |
| 162 | + speed: 4 | |
| 184 | 163 | level: 1 |
| 185 | 164 | label: robot |
| 186 | - offset: {x: 0, y: 0, z: 0} | |
| 165 | + offset: {x: 0, y: 0.5, z: 0} | |
| 187 | 166 | target: {fileID: 0} |
| 167 | +--- !u!136 &5978502647804666025 | |
| 168 | +CapsuleCollider: | |
| 169 | + m_ObjectHideFlags: 0 | |
| 170 | + m_CorrespondingSourceObject: {fileID: 0} | |
| 171 | + m_PrefabInstance: {fileID: 0} | |
| 172 | + m_PrefabAsset: {fileID: 0} | |
| 173 | + m_GameObject: {fileID: 7703008261286675462} | |
| 174 | + m_Material: {fileID: 0} | |
| 175 | + m_IncludeLayers: | |
| 176 | + serializedVersion: 2 | |
| 177 | + m_Bits: 0 | |
| 178 | + m_ExcludeLayers: | |
| 179 | + serializedVersion: 2 | |
| 180 | + m_Bits: 0 | |
| 181 | + m_LayerOverridePriority: 0 | |
| 182 | + m_IsTrigger: 0 | |
| 183 | + m_ProvidesContacts: 0 | |
| 184 | + m_Enabled: 1 | |
| 185 | + serializedVersion: 2 | |
| 186 | + m_Radius: 0.5 | |
| 187 | + m_Height: 2.2 | |
| 188 | + m_Direction: 1 | |
| 189 | + m_Center: {x: 0, y: 0, z: 0} | |
With PrefabLens
Robot.prefab
Demos
- GitHub pull requests: a simulated Files changed page with the real extension and the WASM diff engine.
- CLI: the terminal tree, the HTML report, and git merge.
- Unity Editor: a window that shows semantic diffs for changed assets.
Install
Chrome extension
CLI
brew install hashiiiii/tap/prefablens
scoop bucket add hashiiiii https://github.com/hashiiiii/scoop-bucket
scoop install prefablens
mise use -g github:hashiiiii/PrefabLens
Unity Editor
openupm add com.hashiiiii.prefablens
Or use the Package Manager Git URL: https://github.com/hashiiiii/PrefabLens.git?path=editor
Other installs
Download prebuilt binaries from the releases page.