Browsing articles in "scripts"
Jul
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 […]

May
20
2017

Terrain AlphaMap Texture FilterMode (sharp texture blending)

You can use shader to do sharp blending on terrain textures like this old version custom terrain sharp blending shader, but can also set alphamap texture filtermode instead! (no custom shaders needed) With custom editor script, you can do this: Example project with the editor […]

Mar
25
2017

Mesh Exploder (sources)

Uploaded sources for the old mesh exploder project https://unitycoder.com/blog/2013/08/02/poor-mans-mesh-exploder/ download project: https://github.com/unitycoder/SimpleMeshExploder

Jan
22
2017

Load AssetBundles with Caching

Small sample script to load assetbundles. Features: – It first loads bundle hash from the manifest file on server – Then uses that hash string as asset bundle loader parameter (to use cached version if available, see docs) – Instantiate gameobject after loading source: https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Scripts/AssetBundles/AssetBundleLoader.cs […]

Sep
17
2016

Easy Threading with ThreadPool

Want to use simple threading? ThreadPool seems like an easy solution. Source: (c#) https://github.com/UnityCommunity/UnityLibrary/blob/master/Scripts/Threading/ThreadPoolTest.cs

Mar
27
2016

Shmup Bullet Pattern Editor

Started converting this old bullet pattern script by dhendrix from unityscript to c# and using 2D features.. *still work-in-progress* You can access the sources below (and post issues, or help translating/optimizing the scripts) Sources: https://github.com/unitycoder/BulletPatternEditorUnity

Mar
1
2016

Latitude Longitude Position On 3D Sphere (V2)

This is just a c# conversion and few updated notes for the old post : http://unitycoder.com/blog/2011/08/09/latitude-longitude-on-3d-sphere/ Instructions – Attach the script below to your sphere (Unity sphere UV mapping is not suitable so I downloaded this sphere model and scaled transform to 5) – Add […]

Dec
24
2015

Open & Play MIDI Files with winmm.dll in Unity

Yay – Playing Midi files in unity! Notes: – Works on PC only – If you make a build, midi files wont be included automatically (unless they are in StreamingAssets folder, havent tested it though..) References: – Midi code from http://www.codeguru.com/columns/dotnet/making-music-with-midi-and-c.html – MidiOutCaps c# struct […]

Dec
23
2015

Play Midi Sounds with midi-dot-net dll

Instructions: – Download midi-dot-net from https://code.google.com/p/midi-dot-net/ (from downloads section, midi-dot-net_1.1.0.zip) – Unzip and copy “Midi.dll” into your unity project folder, Assets/Plugins/ – Create c# script and use the source below for testing – Attach the script to gameobject in scene and hit play, should hear […]

Dec
17
2015

Get Angle Between 2 GameObjects in Degrees (0-360)

Small helper script to check angle between 2 objects in degrees (and in between 0-360). It also includes test code for atan2Approximation, have not measured if there are any benefits using it.. Also note [ExecuteInEditMode], so it runs in editor without playmode. This file contains […]

Pages:«1234»

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch Instagram

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.