12
2017
Editor Plugin: Paste Script To File

Small editor script to easily paste full script into new file in project.
(instead of having to manually create new script file, opening it, pasting contents to it, renaming file etc..)
Usage
– Download CopyPasteHelper.cs script from https://github.com/UnityCommunity/UnityLibrary/blob/master/Scripts/Editor/Tools/CopyPasteHelper.cs
– Place it under Editor/ folder in your project
– Select “Window/UnityLibrary/CopyPasteHelper” to open the tool window
– Dock the window somewhere (and save layout if you want to keep it there)
– Copy some script source from web (sample script)
– Click “C#” button on the CopyPasteHelper window
– New script file is created under Assets/Scripts/Paste/
TODO (still missing few important features)
– Parse class and filename from the script (so that created filename matches it)
– Add support for pasting shader files
– Validate clipboard text (to check if its c# or shader)
– Check if its editor script (then save to editor/ folder)
– Add separate folder for shaders
– ..
—
*Best used with this browser plugin (to add Copy button into unity scripting docs)
https://unitycoder.com/blog/2017/07/13/browser-plugin-add-copy-button-to-unity-scripting-docs/
Related Posts
Leave a comment
Recent posts
- Editor Tool: Scene Size Analyzer
- LudumDare 60: Old Tech
- uBasic Scripting Language for Unity
- GreaseMonkey+Editor Plugin: 1-Click Copy script from ChatGPT (Web) to Unity Editor (as script)
- Editor Tool: Property Watcher
- .unityignore : Hide files from Project window
- PostBuild Script to Create Single exe Standalone File
- Game Loop Designer
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
Recent Comments
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by











