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
- MotionVector Effect: Object “disappears” when paused
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
Recent Comments
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on