Browsing articles in "functions"
Jul
24
2016

Enter Play Mode with F5 key

Woaaah! Been waiting for this feature since VB5.. to have unity enter playmode with F5 key! *Same key can be used to stop play mode also Founded pretty much ready script from unity answers, removed the secondary shortcut and added check for if in playmode, […]

Sep
22
2015

Increase Terrain Detail Draw Distance in Editor

Its quite annoying how the grass fades in editor (since 250 is the maximum view distance in Terrain settings), but you can force the draw distance higher with simple script whichs runs in editor References: http://docs.unity3d.com/ScriptReference/Terrain-detailObjectDistance.html http://docs.unity3d.com/ScriptReference/ExecuteInEditMode.html Sample code: *Note this runs with Update loop […]

Jul
26
2015

Create Orthographic Screen EdgeColliders2D

Small snippet for adding EdgeCollider2D along screen edges. (for orthographic camera). Add script to empty gameobject (at position 0,0,0). *My camera was at 0,0,-10 This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the […]

Jun
2
2015

Dolly Zoom Effect

http://en.wikipedia.org/wiki/Dolly_zoom This version only works when target is directly at front (towards z), also viewWidth is manually given..(see for formula on that wikipage) Source: (attach to camera) This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To […]

Dec
24
2014

Mobius strip Mesh Generator

^Current results.. drawn with Debug.Drawline() for now.. Trying to create möbius strip mesh using a script.. Founded some formulas here: (and it even has .obj exporter, but rather do it inside unity..) http://www.java2s.com/Open-Source/CSharp_Free_Code/3D/Download_Helix_3D_Toolkit.htm  TODO: – Build mesh (möbius strip) ** Well there is now better […]

Nov
12
2014

Draw Munching Squares

Converted this php script into unity, while trying to keep it similar to original code.. again some difference in the output but close enough.. http://rosettacode.org/wiki/Munching_squares#PHP   Source c# (MunchingSquares.cs)    

Nov
11
2014

Image To Grayscale Script

Quick test trying to convert this Basic256 script into Unity c# (trying to keep it close to original code..) maybe still some problems as the output seems darker than the example.. http://rosettacode.org/wiki/Grayscale_image#BASIC256 Source C# (Image2Grayscale.cs)

Nov
10
2014

Draw Ascii Sphere

Just for fun tried to convert this LUA script into unity c#, Original source: http://rosettacode.org/wiki/Draw_a_sphere#Lua *Note this source outputs the file into spheredump.txt file (at project root folder) C# Source ( DrawSphere.cs ) *not optimized..    

May
18
2014

GUI Transition Effects [open source]

Published simple starter script/plugin for making GUITexture effects (currently just movement transitions). Sources: https://github.com/unitycoder/PoorMansGuiFx *Feel free to suggest/push updates there Webplayer http://unitycoder.com/upload/demos/PoormansGUIFx/ Forum thread: http://forum.unity3d.com/threads/247553-Free-Simple-GUITexture-GUIText-transition-effects TODO: – Make it simpler to use:  maybe custom inspector for effect dropdowns, movement direction etc. – Events? Event chaining..(after […]

Sep
13
2013

Halton Sequence c#

Halton Sequence script to Unity c#. (image: Left side halton sequence, right side using Random.value). Needed something to distribute objects evenly on given area.. this works for small amount of objects <200, but if add more, they start to form lines(?) Converted from: “Halton Sequence […]

Pages:12»

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch

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.