I put this together a while ago. Maybe you’ll find it useful.
Overview

- Single script, plug-and-play.
- Double-click the text area to edit.
Installation
Either paste the script below into your project, or install it as a package via the Unity Package Manager using this URL:0
https://gist.github.com/19c183d115953f26c62cbdced7fab5a2.git
Source
Optimization
- During build, the
[PostProcessScene]callback removes instances of the component from your scenes. - Since we can’t remove the entire component from prefabs at build time1, the
ISerializationCallbackReceivercallback clears the comment content. - You can even use it with ECS since the component won’t be baked at all.
Yes, you can install packages straight from GitHub Gists (if they’re set up with a
package.jsonand an.asmdef). I’m as surprised as you are that this actually works, but Gists are built on top of regular Git repositories, so it makes sense. return ︿I looked, but couldn’t find any way to do this. If I recall correctly, deleting the component during serialization results in an error. I wish we had
[PostProcessPrefab]or something… return ︿



