Scripts

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(added introduction and contributions sections)
 
(521 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
 +
{{Scripts Navigation}}
  
<b>Camera Controls</b>
+
== Introduction ==
*[[Headbobber]] - This script makes an object bob up and down smoothly when you're pressing one or both of the horizontal/vertical axes.
+
In this section you'll find a large assortment of sample scripts and code snippets contributed by members of the community. These can be accessed by selecting one of the category tabs above.
  
<b>Character Controller Scripts</b>
+
=== Contributions ===
*[[Force2D]] - Place this script on a [http://www.otee.dk/Documentation/ScriptReference/GameObject.html GameObject] and have it constrained to two dimensions.
+
Anyone is free to contribute their own original code to the wiki but you should keep a few things in mind when doing so:
*[[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].
+
*[[VariableSpeedFPSwalker]] - An FPS walker script having different speeds for walking forward, strafing, and backpedaling
+
*[[PhysicsFPSWalker]] - An FPS walker that works by physics and therefore gets friction info from other objects.
+
  
<b>Debugging Scripts</b>
+
# '''No Copyrighted Content''' - Code contributed must be either original or licensed in a way which allows sharing (e.g. public domain, open-source, etc.).
*[[DebugConsole]] - A script to allow scrolling feedback from your scripts. (Was DebugGUIController)
+
# '''Keep It Concise''' - Small scripts and code snippets are ideal. More complex code should be hosted on a platform like [https://bitbucket.org/ Bitbucket] or [https://github.com/ GitHub] instead.
 +
# '''Use Proper Formatting''' - Please read the [[Help:Formatting| formatting help page]] before creating a new script. This will explain how to properly format and structure your code.
  
<b>General Concepts</b>
+
=== License ===
*[[AManagerClass]] - example on how to add easy access to a singleton class in a scene.
+
Unless otherwise specified, all code provided on the Wiki is licensed under Creative Common's Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0).
*[[ToggleGravity]] - example how to toggle a property, in this case the global gravity setting, by the left mouse button.
+
 
+
<b>General Purpose Effect Scripts</b>
+
*[[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.
+
*[[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.
+
*[[Perlin Noise]] - Noise functions for smoothly moving objects around or anything else
+
 
+
<b>Graphical User Interface Scripts</b>
+
*[[Button]] - Use this script on a guiTexture object for regular push buttons that send a message when clicked.
+
*[[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
+
*[[ToggleButton]] - Extends the Button class to create a toggle button.
+
*[[FadeIn]] - Allows you to show/hide a [http://www.otee.dk/Documentation/ScriptReference/GUIText.html GUIText] or [http://www.otee.dk/Documentation/ScriptReference/GUITexture.html GUITexture] when pressing a key/button.
+
 
+
<b>Heads Up Display Scripts</b>
+
*[[MessageDisplayer]] - Use this script on a [http://otee.dk/Documentation/ScriptReference/GUIText.html GUIText] object to have a self-disappearing list of status messages.
+
 
+
<b>Image Postprocessing Effects (require Unity Pro)</b>
+
*[[BloomEffect]] - Sometimes referred to as "glow", use this effect to make bright parts in your scene bleed.
+
 
+
<b>Sound Scripts</b>
+
*[[JukeboxController]] - A very basic jukebox class. This can be used to manage multiple audio clips across different levels.
+

Latest revision as of 20:29, 14 November 2018

Scripts   General   Editor   Controllers   UI   Effects   Physics/Simulation   Networking   Audio   Utility

[edit] Introduction

In this section you'll find a large assortment of sample scripts and code snippets contributed by members of the community. These can be accessed by selecting one of the category tabs above.

[edit] Contributions

Anyone is free to contribute their own original code to the wiki but you should keep a few things in mind when doing so:

  1. No Copyrighted Content - Code contributed must be either original or licensed in a way which allows sharing (e.g. public domain, open-source, etc.).
  2. Keep It Concise - Small scripts and code snippets are ideal. More complex code should be hosted on a platform like Bitbucket or GitHub instead.
  3. Use Proper Formatting - Please read the formatting help page before creating a new script. This will explain how to properly format and structure your code.

[edit] License

Unless otherwise specified, all code provided on the Wiki is licensed under Creative Common's Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0).

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox