Scripts

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Graphical User Interface Scripts)
m (Reorganised - how is Mathfx an 'effects' script? ;))
Line 1: Line 1:
 
== Camera Controls ==  
 
== Camera Controls ==  
 +
 
*[[Headbobber]] - This script makes an object bob up and down smoothly when you're pressing one or both of the horizontal/vertical axes.
 
*[[Headbobber]] - This script makes an object bob up and down smoothly when you're pressing one or both of the horizontal/vertical axes.
  
 
== Character Controller Scripts ==
 
== Character Controller Scripts ==
 +
 
*[[Force2D]] - Place this script on a [http://www.otee.dk/Documentation/ScriptReference/GameObject.html GameObject] and have it constrained to two dimensions.
 
*[[Force2D]] - Place this script on a [http://www.otee.dk/Documentation/ScriptReference/GameObject.html GameObject] and have it constrained to two dimensions.
 
*[[ShipControls]] - Place this script on a [http://www.otee.dk/Documentation/ScriptReference/Rigidbody.html RigidBody] for 2D spaceship controls like [http://otee.dk/gallery/udwc/OverWhelmedArena.html OverWhelmed Arena].
 
*[[ShipControls]] - Place this script on a [http://www.otee.dk/Documentation/ScriptReference/Rigidbody.html RigidBody] for 2D spaceship controls like [http://otee.dk/gallery/udwc/OverWhelmedArena.html OverWhelmed Arena].
Line 9: Line 11:
  
 
== Debugging Scripts ==
 
== Debugging Scripts ==
 +
 
*[[DebugConsole]] - A script to allow scrolling feedback from your scripts.
 
*[[DebugConsole]] - A script to allow scrolling feedback from your scripts.
  
 
== General Concepts ==
 
== General Concepts ==
 +
 
*[[AManagerClass]] - example on how to add easy access to a singleton class in a scene.
 
*[[AManagerClass]] - example on how to add easy access to a singleton class in a scene.
 
*[[ToggleGravity]] - example how to toggle a property, in this case the global gravity setting, by the left mouse button.
 
*[[ToggleGravity]] - example how to toggle a property, in this case the global gravity setting, by the left mouse button.
  
 
== General Purpose Effect Scripts ==
 
== General Purpose Effect Scripts ==
 +
 
*[[CameraFacingBillboard]] - Use this script on a billboard or similar object to make it align itself with the camera.
 
*[[CameraFacingBillboard]] - Use this script on a billboard or similar object to make it align itself with the camera.
 
*[[LookAtCameraYonly]] - Use this script on a billboard or other object to have it face the camera but only rotate on the Y axis.
 
*[[LookAtCameraYonly]] - Use this script on a billboard or other object to have it face the camera but only rotate on the Y axis.
*[[Mathfx]] - This script contains a growing number of small and useful math functions. (Short for Mathf eXtended)
 
 
*[[StopEmittingAfterDelay]] - After a configurable delay, particles will fade naturally, then finally the object will get destroyed with autodestruct.
 
*[[StopEmittingAfterDelay]] - After a configurable delay, particles will fade naturally, then finally the object will get destroyed with autodestruct.
 
*[[Perlin Noise]] - Noise functions for smoothly moving objects around or anything else
 
*[[Perlin Noise]] - Noise functions for smoothly moving objects around or anything else
Line 24: Line 28:
  
 
== Graphical User Interface Scripts ==
 
== Graphical User Interface Scripts ==
 +
 
*[[Box_Script]] - Use this to make differently sized gui boxes with the same border width.
 
*[[Box_Script]] - Use this to make differently sized gui boxes with the same border width.
 
*[[Button]] - Use this script on a guiTexture object for regular push buttons that send a message when clicked.
 
*[[Button]] - Use this script on a guiTexture object for regular push buttons that send a message when clicked.
Line 31: Line 36:
 
*[[GUIFly]] - Use this script on an object to make it respond to a "Fly" message so that it may move on and off the screen in a pleasing manner.
 
*[[GUIFly]] - Use this script on an object to make it respond to a "Fly" message so that it may move on and off the screen in a pleasing manner.
 
*[[GuiRatioFixer]] - Use on a [http://otee.dk/Documentation/ScriptReference/GUIText.html GUIText] /[http://otee.dk/Documentation/ScriptReference/GUITexture.html GUITexture]  object to automatically adjust aspect ratio
 
*[[GuiRatioFixer]] - Use on a [http://otee.dk/Documentation/ScriptReference/GUIText.html GUIText] /[http://otee.dk/Documentation/ScriptReference/GUITexture.html GUITexture]  object to automatically adjust aspect ratio
*[[GuiRatioFixer2]] - Alternate script based on screen's aspect to use on a [http://otee.dk/Documentation/ScriptReference/GUIText.html GUIText] /[http://otee.dk/Documentation/ScriptReference/GUITexture.html GUITexture] object to automatically adjust aspect ratio
+
*[[GuiRatioFixer2]] - Alternate script based on screen's aspect to use on a [http://otee.dk/Documentation/ScriptReference/GUIText.html GUIText] /[http://otee.dk/Documentation/ScriptReference/GUITexture.html GUITexture] object to automatically adjust aspect ratio
 
*[[ToggleButton]] - Extends the Button class to create a toggle button.
 
*[[ToggleButton]] - Extends the Button class to create a toggle button.
 
*[[DragSlider]] - Use this script with a pair of [http://otee.dk/Documentation/ScriptReference/GUITexture.html GUITexture]s to make a functioning slider.
 
*[[DragSlider]] - Use this script with a pair of [http://otee.dk/Documentation/ScriptReference/GUITexture.html GUITexture]s to make a functioning slider.
  
 
== Heads Up Display Scripts ==
 
== Heads Up Display Scripts ==
 +
 
*[[MessageDisplayer]] - Use this script on a [http://unity3d.com/Documentation/Components/class-GuiText.html GUIText] object to have a self-disappearing list of status messages.
 
*[[MessageDisplayer]] - Use this script on a [http://unity3d.com/Documentation/Components/class-GuiText.html GUIText] object to have a self-disappearing list of status messages.
 
*[[FramesPerSecond]] - Use this script on a [http://unity3d.com/Documentation/Components/class-GuiText.html GUIText] object to display FPS counter.
 
*[[FramesPerSecond]] - Use this script on a [http://unity3d.com/Documentation/Components/class-GuiText.html GUIText] object to display FPS counter.
  
 
== Image Postprocessing Effects (require Unity Pro) ==
 
== Image Postprocessing Effects (require Unity Pro) ==
 +
 
*[[BloomEffect]] (OBSOLETE) - Sometimes referred to as "glow", use this effect to make bright parts in your scene bleed.  This script is made obsolete by the GlowEffect shipped with Unity 1.5.
 
*[[BloomEffect]] (OBSOLETE) - Sometimes referred to as "glow", use this effect to make bright parts in your scene bleed.  This script is made obsolete by the GlowEffect shipped with Unity 1.5.
 
*[[BoostColors]] - A very simple and fast way to boost the contrast of saturation of the graphics in your game.
 
*[[BoostColors]] - A very simple and fast way to boost the contrast of saturation of the graphics in your game.
  
 
== Sound Scripts ==
 
== Sound Scripts ==
 +
 
*[[JukeboxController]] - A very basic jukebox class. This can be used to manage multiple audio clips across different levels.
 
*[[JukeboxController]] - A very basic jukebox class. This can be used to manage multiple audio clips across different levels.
  
 
== WWW Scripts ==
 
== WWW Scripts ==
 +
 
*[[VersionCheck]] - A very basic version checker. This can be used to check if the version of the game the user is running is the latest, and if not, send them to a URL to download the latest.
 
*[[VersionCheck]] - A very basic version checker. This can be used to check if the version of the game the user is running is the latest, and if not, send them to a URL to download the latest.
  
 
== Networking Scripts ==
 
== Networking Scripts ==
 +
 
*[[NetworkCursor]] - Serverless realtime networking. An example where one Unity instance controls another via a TCP/IP socket. Could be expanded to do many types of realtime networking.
 
*[[NetworkCursor]] - Serverless realtime networking. An example where one Unity instance controls another via a TCP/IP socket. Could be expanded to do many types of realtime networking.
 +
 +
== Utility Scripts ==
 +
 +
*[[Mathfx]] - This script contains a growing number of small and useful math functions. (Short for Mathf eXtended.)

Revision as of 19:00, 5 August 2006

Contents

Camera Controls

  • Headbobber - This script makes an object bob up and down smoothly when you're pressing one or both of the horizontal/vertical axes.

Character Controller Scripts

Debugging Scripts

  • DebugConsole - A script to allow scrolling feedback from your scripts.

General Concepts

  • AManagerClass - example on how to add easy access to a singleton class in a scene.
  • ToggleGravity - example how to toggle a property, in this case the global gravity setting, by the left mouse button.

General Purpose Effect Scripts

  • CameraFacingBillboard - Use this script on a billboard or similar object to make it align itself with the camera.
  • LookAtCameraYonly - Use this script on a billboard or other object to have it face the camera but only rotate on the Y axis.
  • StopEmittingAfterDelay - After a configurable delay, particles will fade naturally, then finally the object will get destroyed with autodestruct.
  • Perlin Noise - Noise functions for smoothly moving objects around or anything else
  • Animating Tiled texture - A texture made of many tiles animated through setting the uv offsets

Graphical User Interface Scripts

  • Box_Script - Use this to make differently sized gui boxes with the same border width.
  • Button - Use this script on a guiTexture object for regular push buttons that send a message when clicked.
  • DraggableGUIElement - Click and drag on GUITexture or GUIText to move it around the screen.
  • FadeIn - Allows you to show/hide a GUIText or GUITexture when pressing a key/button.
  • ForwardAllMouseEvents - Send mouse events to some sort of controller type GameObject.
  • GUIFly - Use this script on an object to make it respond to a "Fly" message so that it may move on and off the screen in a pleasing manner.
  • GuiRatioFixer - Use on a GUIText /GUITexture object to automatically adjust aspect ratio
  • GuiRatioFixer2 - Alternate script based on screen's aspect to use on a GUIText /GUITexture object to automatically adjust aspect ratio
  • ToggleButton - Extends the Button class to create a toggle button.
  • DragSlider - Use this script with a pair of GUITextures to make a functioning slider.

Heads Up Display Scripts

Image Postprocessing Effects (require Unity Pro)

  • BloomEffect (OBSOLETE) - Sometimes referred to as "glow", use this effect to make bright parts in your scene bleed. This script is made obsolete by the GlowEffect shipped with Unity 1.5.
  • BoostColors - A very simple and fast way to boost the contrast of saturation of the graphics in your game.

Sound Scripts

  • JukeboxController - A very basic jukebox class. This can be used to manage multiple audio clips across different levels.

WWW Scripts

  • VersionCheck - A very basic version checker. This can be used to check if the version of the game the user is running is the latest, and if not, send them to a URL to download the latest.

Networking Scripts

  • NetworkCursor - Serverless realtime networking. An example where one Unity instance controls another via a TCP/IP socket. Could be expanded to do many types of realtime networking.

Utility Scripts

  • Mathfx - This script contains a growing number of small and useful math functions. (Short for Mathf eXtended.)
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox