Skip to content

Instantly share code, notes, and snippets.

@nrichards
nrichards / ReplaceWithPrefab.cs
Last active September 30, 2022 03:04 — forked from SiarheiPilat/ReplaceWithPrefab.cs
Unity 2022 script, ReplaceWithPrefab: To edit a scene's Prefab model and data, avoiding editing the original Prefab
using UnityEngine;
using UnityEditor;
/// Video: https://youtu.be/1FhVMFMG97Q
/// Taken from: https://gist.github.com/SiarheiPilat/05463e64d4662860c6a799bb23d9aec8
/// Forked from: https://gist.github.com/unity3dcollege/c1efea3f87d3775bee3e010e9c6d7648
/// Author: Siarhei Pilat (Suasor AB)
/// License: MIT
public class ReplaceWithPrefab : EditorWindow