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
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
- Convert LAS/LAZ/PLY pointclouds to GLTF (GLB) Point Meshes (standalone converter)
- Detect SRP (URP or HDRP) with Assembly Definition Version Defines
- [LudumDare57] Theme: Depths
- MotionVector Effect: Object “disappears” when paused
Recent Comments
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
- on UI Scroll View automatic Content height
- on [Asset Store] Point Cloud Viewer & Tools
- on [Asset Store] Point Cloud Viewer & Tools
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by











