Skip to content

Instantly share code, notes, and snippets.

@desplesda
Last active October 20, 2021 18:47
Show Gist options
  • Save desplesda/53dc952c236542235f51b589280cd02d to your computer and use it in GitHub Desktop.
Save desplesda/53dc952c236542235f51b589280cd02d to your computer and use it in GitHub Desktop.
A sed script that fixes Unity UI component references when downgrading from 2019.3 to earlier versions.
# UnityUI2019to2018.sed
#
# Jon Manning (@desplesda) 2020
#
# Replaces instances of Unity UI components that refer to the package version of Unity UI (2019.3+), as opposed to the built-in version of Unity (2019.2 and earlier). Can be used on .prefab and .scene files.
#
# Usage: sed -f UnityUI2019to2018.sed SceneOrPrefab2019.unity > SceneOrPrefab2018.unity
# Button
s/m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}/m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# CanvasScaler
s/m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}/m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# ContentSizeFitter
s/m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}/m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Dropdown
s/m_Script: {fileID: 11500000, guid: 0d0b652f32a2cc243917e4028fa0f046, type: 3}/m_Script: {fileID: 853051423, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# EventSystem
s/m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}/m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Graphic
s/m_Script: {fileID: 11500000, guid: a6238e9452bfc704f82ff36791fe1a45, type: 3}/m_Script: {fileID: 383007879, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# GraphicRaycaster
s/m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}/m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# HorizontalLayoutGroup
s/m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}/m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# HorizontalOrVerticalLayoutGroup
s/m_Script: {fileID: 11500000, guid: a5c214e5846a99242b348c37e49b2f59, type: 3}/m_Script: {fileID: 812294440, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Image
s/m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}/m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# InputField
s/m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3}/m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# LayoutElement
s/m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}/m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# LayoutGroup
s/m_Script: {fileID: 11500000, guid: cb7c939a806f03341b682c180dc13f08, type: 3}/m_Script: {fileID: -555945567, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Mask
s/m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}/m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# MaskableGraphic
s/m_Script: {fileID: 11500000, guid: 976acc75bfafe594cb01142ba21947be, type: 3}/m_Script: {fileID: -1493381411, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Outline
s/m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}/m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# PositionAsUV1
s/m_Script: {fileID: 11500000, guid: 020ee4c1798a3d243a4b8cbfee6cac2d, type: 3}/m_Script: {fileID: 1849938685, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# RawImage
s/m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}/m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# RectMask2D
s/m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}/m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Scrollbar
s/m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3}/m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# ScrollRect
s/m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3}/m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Selectable
s/m_Script: {fileID: 11500000, guid: 7a98125502f715b4b83cfb77b434e436, type: 3}/m_Script: {fileID: -234403039, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Shadow
s/m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3}/m_Script: {fileID: 1573420865, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Slider
s/m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3}/m_Script: {fileID: -113659843, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# StandaloneInputModule
s/m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}/m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Text
s/m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}/m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# Toggle
s/m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3}/m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# ToggleGroup
s/m_Script: {fileID: 11500000, guid: 2fafe2cfe61f6974895a912c3755e8f1, type: 3}/m_Script: {fileID: -1184210157, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
# VerticalLayoutGroup
s/m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}/m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3}/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment