From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Utility Scripts)
Line 125: Line 125:
*[[TextureUtils]] - Functions for colorizing, masking, and merging textures at runtime.
*[[TextureUtils]] - Functions for colorizing, masking, and merging textures at runtime.
*[[TileSelector]] - An Inspector extension that creates a pop-up window to select a tile or a NxM group of tiles from a main tileset, for use in a sprite object.
*[[TileSelector]] - An Inspector extension that creates a pop-up window to select a tile or a NxM group of tiles from a main tileset, for use in a sprite object.
*[[Timer]] - A timer that counts down from a duration to zero with some additional uses.
*[[TinyXmlReader]] - A class that reads XML text and parses it for use.
*[[TinyXmlReader]] - A class that reads XML text and parses it for use.
*[[Triangulator]] - A utility class for splitting a 2D polygon into triangles.
*[[Triangulator]] - A utility class for splitting a 2D polygon into triangles.

Revision as of 03:30, 17 October 2011

General   Editor   Controllers   GUI   Effects   Physics / Simulation   Networking   Sound   Development


General Concepts

  • AManagerClass - How to add easy access to a singleton class in a scene.
  • AStarHelper - Textbook implementation of the A* pathing routine.
  • BasicDataStructures - Discussion of the use of the data-structures available in Unity.
  • BooMessenger - An efficient and simple to use messaging platform. Allows hierarchial grouping of message types.
  • CoroutineScheduler - A coroutine scheduler implementation. Gain a better understanding of coroutines.
  • CoUpdate - An alternative to Update which support yield instructions. Benefit from cleaner code.
  • Executors Framework - A framework for multi-threading without getting a headache. (Warning: The Unity API is not thread-safe)
  • CSharpEventManager - C# implementation of a messaging/notification system. Allows subscription to events without referencing their definitions.
  • CSharpMessenger - Another C# messaging/notification system implemented using delegates and generics.
  • CSharpMessenger Extended - C# messaging system using delegates and generics. Based on CSharpMessenger but has more error detection.
  • FakeGizmoDemo - simple example of creating a fake Gizmo - a three-arrow axis, mouse-moveable, that can be applied to an object at Runtime, not just during editing. Also contains an example of Procedural Mesh Creation - using only code to create an in-game mesh object from vertices and triangles.
  • JavascriptMultiDimArrays - Declare multi-dimensional arrays like int[,] or int[][] in JS (mostly obsolete in Unity 3.2, though still useful for jagged arrays)
  • Lipis Runtime Gizmo - Update on Lipis Runtime Gizmo (works with Translation, Rotation, and Scale). Included C# code and corrected javascript code removing unity 3D reserved words in code.
  • MessageRouter - subscription based messaging with delayed notification, delivery stages, message filtering, tagging, and receiver assertions
  • NotificationCenter - Register scripts to receive and post notifications. Handles messaging across scripts without references to each other.
  • SimpleRegex - How one might use regular expressions in Unity.
  • SQLite - How to integrate SQLite into your project.
  • ToggleGravity - How to toggle a property, in this case the global gravity setting, by the left mouse button.

Utility Scripts

  • AddChild - Adds an empty GameObject as a child of each selected object.
  • Angle - Helper class to work with angles.
  • ArrayPrefs - Functions for saving and loading arrays of ints, floats, and strings using PlayerPrefs. (Made obsolete by ArrayPrefs2.)
  • ArrayPrefs2 - Faster and better than ArrayPrefs. Save/load Vector2, Vector3, Quaternion, Color as well as a bunch of different array types.
  • Autorun - Execute some code exactly once, whenever the project is opened, recompiled, or run.
  • AutoSave - This script creates a new window in the editor with a autosave function. It is saving your current scene with an interval from 1 minute to 10 minutes.
  • BoneDebug - Draws debug bones in a character.
  • BoolPrefs - Adds GetBool and SetBool, which are missing from PlayerPrefs.
  • Bresenham3D - An enumerator that allows you to loop through all integer Vector3's along a line.
  • ComponentInstantiationUtility - Static C# class that allows you to instantiate pre-parented components as game objects with one easy line of code.
  • CustomRandom - C# Random number generator, when you must have a random number generator that works the same way on all platforms!
  • DeepCopy - Creates a deep copy of an array or hashtable.
  • deepSearch - Searches recursively from the parent down.
  • ExpandoObject - Create ECMAScript-style expando objects in Unity Javascript.
  • ExtRandom - An extension to the Unity class Random
  • FingerManager - Easily manage multi-touch phases for iPhone.
  • HexConverter - Functions for converting decimal colors to hexadecimal... and back.
  • HSBColor - This utility script provides a HSB color model in addition to Unity's built in RGB Color class.
  • Interpolate - Interpolation utility functions for easing, Bezier splines, and Catmull-Rom splines.
  • IsVisibleFrom - An extension method for checking if an Renderer is rendered by a specific Camera.
  • IPhoneToMouse - Replaces iPhoneInput commands with Input so you can use it in PC/Mac Version too.
  • LABColor - This utility script provides an LAB color model. Lab color is designed to approximate human vision and so it aspires to perceptual uniformity.
  • LanguageFilter - Removes badwords from strings using regular expressions.
  • LayerMaskExtensions - Extension class to add usability and easier debugging to LayerMasks.
  • Layers - A utility script for holding easily-accessible layers and easily creating masks.
  • Mathfx - This script contains a growing number of small and useful math functions (short for Mathf eXtended).
  • Matrix - A class for doing 3D matrix math against Vector3 objects.
  • MazeGenerator - Randomly generates a maze.
  • MD5 - Generate an MD5 hash for a string.
  • MeshCreationHelper - Helper to create a new mesh from some mesh's submesh.
  • MeshMerger - Draw a large number of meshes with a single draw call.
  • MeshSmoother - Deformation of a mesh by applying Laplacian/HC-Algorithm Smoother, also script for finding adjacent vertices in a mesh.
  • MeshSubdivision - Center and edge subdivision.
  • MetadataSystem - Mechanism for ciphered, compressed preferences and declarative metadata system with runtime overrides.
  • MetaMorph - MetaMorph is a Unity3d and Blender3d toolkit that allows mesh animation in Unity games using Blender shapekeys.
  • MixupGO - Flatten GameObjects and all attached components into a single object using duck typing in Unity Javascript.
  • ObjExporter - A simple utility class for exporting a mesh to an obj file.
  • ObjExporterColorUvs - Enhanced version of ObjExporter that also exports vertex color and multiple uvsets to an obj file.
  • ObjImporter - Import .obj files at runtime.
  • PlaySoundAtInterval - Plays a sound file at the specified intervals of time.
  • PolyContainsPoint - Like Rect.Contains, except instead of a rect, you can define any arbitrary polygon.
  • PolyOrderFixupOnImport - Replaces original polygon ordering in a mesh after possible unwanted optimizations by Unity.
  • PrintPolyCount - Prints total vertex and triangle count in the object hierarchy.
  • PropertyListSerializer - Loads and saves a .plist XML file to and from a hierarchical hashtable.
  • QuaternionExtensions - A set of useful extension methods to the inbuilt Quaternion struct.
  • ReflectedObject - Reflects a target object, providing quick access by name to reading/writing its fields/properties, and calling its methods.
  • Set - A set data structure.
  • Shell - A replacement for the built-in shell function removed from Unity 1.6.1.
  • SimpleDictionary - Implements a simple dictionary-like object AND lets you save/load the dictionaries to text files.
  • Simple LOD Manager - Script to handle arbitrary number and distances for Level-Of-Detail in models
  • SpeedLerp - Replacements for Mathf.Lerp, InverseLerp, SmoothStep, etc. that are typically 1.5X faster or more. Also adds Vector2Lerp and SuperLerp.
  • Startup Manager - A singleton class that handles starting up scripts in a sorted order based on a priority variable
  • StringToValue - Functions for finding data within a string.
  • StringUtil - Word wrap and line count functions.
  • TextScanner - A utility class for parsing strings using std C sscanf format strings.
  • TextureDrawCircle - A function that draws circles inside a texture.
  • TextureDrawLine - A function that draws lines inside a texture.
  • TextureScale - Resize textures, while scaling the contents using either bilinear or point filtering.
  • TextureUtils - Functions for colorizing, masking, and merging textures at runtime.
  • TileSelector - An Inspector extension that creates a pop-up window to select a tile or a NxM group of tiles from a main tileset, for use in a sprite object.
  • Timer - A timer that counts down from a duration to zero with some additional uses.
  • TinyXmlReader - A class that reads XML text and parses it for use.
  • Triangulator - A utility class for splitting a 2D polygon into triangles.
  • UnitSphere - A collection of random unit vector generating functions. (C#)
  • Unity_Custom_Input_Manager - Allows you to change input configuration on the fly. Default inputmanager only allows you to change on start.
  • UnityPaint - A script to draw anti-aliased lines, brush strokes and vector lines on a texture.
  • UVTransfer - Editor script to transfer UVs between two models.
  • VertexInfo - Displays the vertex numbers of a mesh at the runtime.
  • XKCDColors - A collection of 948 color constants, from the xkcd color survey (C#).

Really Simple Scripts

  • 3DMenu - A simple main menu for 3d text in your scene
  • ConstantVelocity - Set a local velocity to an object (useful for missiles perhaps?)
  • Flashlight - Allows the switching on and off of a light in script.
  • UpdatePump - Register any method in any object to be called in one of Unity's update loops.
  • OnCollideExplode - Spawn a prefab (explosion) on collision, and remove the GameObject from the game.
  • OnCollideSound - Spawn a prefab (preferably a sound) if a collision is over a certain magnitude.
  • OnExplosionEffect - Give an explosive effect over an area.
  • OnMouseDown - Sends OnMouseDown messages on an iPhone.
  • PointerManager - Hides the mouse pointer when it is not in use.
  • SwitchCamera - Switches between cameras in your scene.
  • Teleporter - Teleport all objects from one place to another.

Code Snippets

Personal tools