Scripts/Utility

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
m
m (Preparation of the BuildInfos article page addition)
 
(14 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 +
{{Scripts Navigation}}
 +
 +
== Singletons ==
 +
 +
*[[Singleton]] - Useful base class for creating MonoBehaviour derived singletons.
 +
*[[SingletonLauncher|Singleton Launcher]] - Creates automatically loading singletons. No scene setup required.
 +
*[[Secure UnitySingleton]] - Unity Specific Singleton with a concise interface for creators.
 +
*[[AutoSingletonManager]] - Easy and automatic creation of singleton manager objects.
 +
 +
== Event Systems ==
 +
 +
*[[Advanced CSharp Messenger|Advanced Messenger]] - Simple and efficient messaging system implemented with delegates and generics. Allows for logging of messages, has extended error detection, and adds extra protection from unexpected exceptions.
 +
*[[BroadcasterMessenger]] - Modified version of Messenger Extended.
 +
*[[CSharpEventManager|Event Manager]] - Messaging/notification system. Allows subscription to events without referencing their definitions.
 +
*[[CSharpMessenger|Messenger]] - Another messaging/notification system implemented using delegates and generics.
 +
*[[CSharpMessenger Extended|Messenger Extended]] - messaging system using delegates and generics. Based on [[CSharpMessenger|Messenger]] but has more error detection.
 +
*[[DelayedDelegates]] - An easy, central way to call function with a delay
 +
*[[DelayedMessage]] - A super simple way to send a message to an object after a number of seconds, and optionally repeat.
 +
*[[MessageRouter]] - subscription based messaging with delayed notification, delivery stages, message filtering, tagging, and receiver assertions
 +
*[[CSharpNotificationCenter|Notification Center]] - Register scripts to receive and post notifications.  Handles messaging across scripts without references to each other.
 +
*[[NotificationCenterGenerics]] - A version of Notification Center that has stricter typing.
 +
 +
== Serialization ==
 +
 +
*[[Config loading]] - A well considered pattern for loading global data. Doesn't require the Resources folder or any scene data.
 +
*[[Load Data from Excel 2003]] - This script allows you to load information from excel spreadsheets into Unity, written in C#.
 +
*[[Save and Load from XML]] - Allows you to save and load data from an XML file.
 +
*[[Save and Load from XML U3 Collections]] - Save and load all GameObjects in a scene.
 +
*[[ArrayPrefs2]] - Save/load Vector2, Vector3, Quaternion, Color and other array types.
 +
*[[PlayerPrefsX2]] - Extended PlayerPrefs for object that requires [[ArrayPrefs]].
 +
*[[BoolPrefs]] - Adds GetBool and SetBool, which are missing from PlayerPrefs.
 +
*[[CSVReader]] - Simple script to load CSV files into the project.
 +
*[[LoadSettings]] - Allows loading settings.txt files into your project with easy data insertion and debug tests.
 +
*[[MetadataSystem]] - Mechanism for ciphered, compressed preferences and declarative metadata system with runtime overrides.
 +
*[[PlayerSave]] - Functionality of PlayerPrefs but lets you specify the save location for each platform.
 +
*[[PropertyListSerializer]] - Loads and saves a .plist XML file to and from a hierarchical hashtable.
 +
*[[SimpleDictionary]] - Implements a simple dictionary-like object and lets you save/load the dictionaries to text files.
 +
*[[TinyXmlReader]] - A class that reads XML text and parses it for use.
 +
*[[TinyXmlReaderWeb]] - TinyXmlReader to use with the web player.
 +
*[[PrivateFieldWarnings]] - A shell script to silence warnings about private serialized fields that are not assigned to in code.
 +
 +
== Helper Classes ==
 +
 +
*[[Mathfx]] - Collection of useful math functions (short for Mathf eXtended).
 +
*[[Matrix]] - A class for doing 3D matrix math against Vector3 objects.
 +
*[[CustomRandom]] - Random number generator that works the same way on all platforms.
 +
*[[ExtRandom]] - An extension to the Unity Random class.
 +
*[[Angle]] - Helper class to work with angles.
 +
*[[DirectionFinder]] - Determines the general direction between two vectors.
 +
*[[Get Aspect Ratio]] - A simple function that returns an aspect ratio between two values as Vector2.
 +
*[[HexConverter]] - Functions for converting decimal colors to hexadecimal and back.
 +
*[[Interpolate]] - Interpolation utility functions for easing, Bezier splines, and Catmull-Rom splines.
 +
*[[QuaternionExtensions]] - A set of useful extension methods to the inbuilt Quaternion struct.
 +
*[[SphericalCoordinates]] - A class to manipulate an object's position with spherical coordinates instead of cartesian.
 +
*[[UnitSphere]] - A collection of random unit vector generating functions. (C#)
 +
 +
== Time ==
 +
 +
*[[CoroutineScheduler]] - A coroutine scheduler implementation. Gain a better understanding of coroutines.
 +
*[[CoroutineHelper]] - A collection of some helper classes to get easy access to coroutine features for delegates.
 +
*[[CoUpdate]] - An alternative to Update which support yield instructions. Benefit from cleaner code.
 +
*[[CustomFixedUpdate]] - A class that allows you to create seperate FixedUpdate callbacks are any rate you like.
 +
*[[UpdatePump]] - Register any method in any object to be called in one of Unity's update loops.
 +
*[[SpeedLerp]] - Replacements for Mathf.Lerp, InverseLerp, SmoothStep, etc. that are typically 1.5X faster or more. Also adds Vector2Lerp and SuperLerp.
 +
*[[TimeOfDay]] - Compute the game time into hours, minutes and seconds depending on the duration of a day.
 +
*[[GeneralTimer]] - A simple timer component that includes a few extra methods for ease of use.
 +
*[[QuickTimer]] - A poll based timer useful in "called on each frame" methods.
 +
*[[SimpleTimer]] - A basic non-Monobehaviour timer script that can start and pause.
 +
*[[AbortableEnumerator]] - Provides the ability to Stop a Coroutine without calling StopCoroutine.
 +
 +
== UI ==
 +
 +
*[[Anchor Multi Resolution]] - Anchor GameObject to specific screen positions. Can be used for GUI as well. Utilize orthographic camera.
 +
*[[GuiTextOverParent]] - Auto tracks a child GuiText over a 2D sprite.
 +
 +
== Editor ==
 +
 +
*[[Autorun]] - Execute some code whenever the project is opened, recompiled, or run.
 +
*[[AutoSave]] - Automatically save the current scene at regular intervals.
 +
*[[FindMissingScripts]] - Search for broken/missing MonoBehaviors on GameObjects.
 +
*[[AddChild]] - Add an empty child GameObject to each selected GameObject.
 +
 +
== Optimization ==
 
 
{| style="width:100%; margin:auto; background:transparent;" cellspacing="0" cellpadding="0" valign="top" border="0" |
+
*[[CombineChildrenBones]] - Similar to MeshMerger, this script combines MeshFilter meshes into a single skinned mesh and then tracks transform changes
| style="padding:0 .3em; background-color:#CEE0F2; font-size:90%; border:solid 2px #A3B1BF; text-align:center" width="8%" | {{{1|[[Scripts/General| General]]}}}
+
*[[CombineSkinnedMeshes]] - A Script that allows to combine multiple skinned meshes to just one SkinnedMeshRenderer. Useful for Avatar System!
+
*[[SkinnedMeshCombiner]] - This script will combine skinned meshes whilst retaining their animation and texture properties.
| style="border-bottom:2px solid #A3B1BF" width="1%" |  
+
*[[SkinMeshCombineUtility]] - Script to work with CombineSkinnedMeshes.
+
*[[SpriteManager]] - A script that allows many independently-moving 2D sprites to be drawn using a single draw call.  This is particularly useful to increase iPhone performance.
| style="padding:0.3em; font-size:90%; background-color:#CEE0F2; border:solid 2px #A3B1BF; text-align:center" width="8%" | {{{2|[[Scripts/Controllers| Controllers]]}}}
+
*[[StaticPerformanceOptimization]] - A script that optimizes performance statically based on the users graphics card by dropping terrain resolution and quality settings
+
| style="border-bottom:2px solid #A3B1BF" width="1%" |  
+
+
| style="padding:0 .3em; background-color:#CEE0F2; font-size:90%; border:solid 2px #A3B1BF; text-align:center" width="8%" | {{{2|[[Scripts/GUI|GUI]]}}}
+
+
| style="border-bottom:2px solid #A3B1BF" width="1%" |  
+
+
| style="padding:0.3em; font-size:90%; background-color:#CEE0F2; border:solid 2px #A3B1BF; text-align:center" width="8%" | {{{2|[[Scripts/Effects| Effects]]}}}
+
+
| style="border-bottom:2px solid #A3B1BF" width="1%" |  
+
+
| style="padding:0.3em; font-size:90%; background-color:#CEE0F2; border:solid 2px #A3B1BF; text-align:center" width="8%" | {{{2|[[Scripts/Physics| Physics / Simulation]]}}}
+
+
| style="border-bottom:2px solid #A3B1BF" width="1%" |  
+
+
| style="padding:0 .3em; background-color:#CEE0F2; font-size:90%; border:solid 2px #A3B1BF; text-align:center" width="8%" | {{{2|[[Scripts/Networking| Networking]]}}}
+
+
| style="border-bottom:2px solid #A3B1BF" width="1%" |  
+
+
| style="padding:0.3em; font-size:90%; background-color:#CEE0F2; border:solid 2px #A3B1BF; text-align:center" width="8%" | {{{2|[[Scripts/Sound| Sound]]}}}
+
+
| style="border-bottom:2px solid #A3B1BF" width="1%" |  
+
+
| style="padding:0 .3em; background-color:#CEE0F2; font-size:90%; border:solid 2px #A3B1BF; text-align:center" width="8%" | {{{2|[[Scripts/Development| Development]]}}}
+
|-
+
{|cellspacing="10px" valign="top" style="background:white; border-left:2px solid #A3B1BF; border-right:2px solid #A3B1BF"
+
|-
+
| valign="top"|
+
  
{| align="right"
+
== Analytics and Testing ==
  | __TOC__
+
  |}
+
== Debugging Scripts ==
+
  
*[[AllocationStats]] - AllocationStats is a simple helper utility for showing how much memory your application has allocated. It uses GC.GetTotalMemory to keep track of the memory usage.
+
*[[BoneDebug]] - Draws debug bones in a character.
*[[DetectLeaks]] - This script will displays the number of alloctated unity objects by type. This is useful for finding leaks. Knowing the type of object (mesh, texture, sound clip, game object) that is getting leaked is the first step.
+
*[[AllocationStats]] - Shows how much memory your application has allocated.
 +
*[[DetectLeaks]] - Displays the number of allocated objects by type. Useful for finding leaks.
 
*[[DebugConsole]] - A script to allow scrolling feedback from your scripts.
 
*[[DebugConsole]] - A script to allow scrolling feedback from your scripts.
*[[DebuggerX]] - A simple javascript singleton that allows you to send debug to the console or the GUI
+
*[[2020/DebugConsole]] - An up to date (as of 2020) script to allow scrolling feedback from your scripts.
*[[DrawArrow]] - builds upon Debug.DrawRay() to add arrowheads at the tip
+
*[[DebuggerX]] - A simple javascript singleton that allows you to send debug to the console or the GUI.
 +
*[[DebugLine]] - Like the Debug.DrawRay() and DrawLine() functions, but uses the lineRenderer component to draw in the Game window.
 +
*[[DrawArrow]] - Builds upon Debug.DrawRay() to add arrowheads at the tip.
 
*[[NUnit]] - de-facto standard for unit testing in .NET
 
*[[NUnit]] - de-facto standard for unit testing in .NET
*[[Profiler]] - a simple c# script for profiling the performance of scripts, based on tags
+
*[[Profiler]] - Script for profiling the performance of scripts, based on tags.
*[[Reporter]] - a simple delayed action system info script that could be used for support purposes
+
*[[Reporter]] - Delayed action system info script that could be used for support purposes.
*[[UUnit]] - a Simple xUnit framework that can be run inside Unity.
+
*[[UUnit]] - Simple xUnit framework that can be run inside Unity.
*[[SharpUnit]] - a unit testing framework adapted from UUnit but written in C#. Can also be run inside Unity3D.
+
*[[SharpUnit]] - Unit testing framework adapted from UUnit that can be run inside Unity.
*[http://u3d.as/content/eye3ware/test-star/2dB TestStar] - full featured editor extension inspired by UUnit/SharpUnit. Uses NUnit to provide assert syntax. (non free)
+
*[[DetectDynamicBatching]] - Script+shader that helps you detect which meshes are batched dynamically and which aren't.
 
+
*[[GetTotalMemoryTest]] - Script to help illustrate Mono memory allocation mechanics. Indicates that System.GC.GetTotalMemory always changes by multiples of 4096 bytes.
|}
+
*[[BuildInfos]] - Automatic Build infos generation and usage.
<div style="border:2px solid #A3B1BF;padding:.5em 1em 1em 1em; border-top:none; border-bottom:2px solid #A3B1BF;  border-right:2px solid #A3B1BF; background-color:#ffffff; color:#000;">
+
 
+
</div>
+

Latest revision as of 18:56, 6 July 2020

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

Contents

[edit] Singletons

[edit] Event Systems

  • Advanced Messenger - Simple and efficient messaging system implemented with delegates and generics. Allows for logging of messages, has extended error detection, and adds extra protection from unexpected exceptions.
  • BroadcasterMessenger - Modified version of Messenger Extended.
  • Event Manager - Messaging/notification system. Allows subscription to events without referencing their definitions.
  • Messenger - Another messaging/notification system implemented using delegates and generics.
  • Messenger Extended - messaging system using delegates and generics. Based on Messenger but has more error detection.
  • DelayedDelegates - An easy, central way to call function with a delay
  • DelayedMessage - A super simple way to send a message to an object after a number of seconds, and optionally repeat.
  • MessageRouter - subscription based messaging with delayed notification, delivery stages, message filtering, tagging, and receiver assertions
  • Notification Center - Register scripts to receive and post notifications. Handles messaging across scripts without references to each other.
  • NotificationCenterGenerics - A version of Notification Center that has stricter typing.

[edit] Serialization

  • Config loading - A well considered pattern for loading global data. Doesn't require the Resources folder or any scene data.
  • Load Data from Excel 2003 - This script allows you to load information from excel spreadsheets into Unity, written in C#.
  • Save and Load from XML - Allows you to save and load data from an XML file.
  • Save and Load from XML U3 Collections - Save and load all GameObjects in a scene.
  • ArrayPrefs2 - Save/load Vector2, Vector3, Quaternion, Color and other array types.
  • PlayerPrefsX2 - Extended PlayerPrefs for object that requires ArrayPrefs.
  • BoolPrefs - Adds GetBool and SetBool, which are missing from PlayerPrefs.
  • CSVReader - Simple script to load CSV files into the project.
  • LoadSettings - Allows loading settings.txt files into your project with easy data insertion and debug tests.
  • MetadataSystem - Mechanism for ciphered, compressed preferences and declarative metadata system with runtime overrides.
  • PlayerSave - Functionality of PlayerPrefs but lets you specify the save location for each platform.
  • PropertyListSerializer - Loads and saves a .plist XML file to and from a hierarchical hashtable.
  • SimpleDictionary - Implements a simple dictionary-like object and lets you save/load the dictionaries to text files.
  • TinyXmlReader - A class that reads XML text and parses it for use.
  • TinyXmlReaderWeb - TinyXmlReader to use with the web player.
  • PrivateFieldWarnings - A shell script to silence warnings about private serialized fields that are not assigned to in code.

[edit] Helper Classes

  • Mathfx - Collection of useful math functions (short for Mathf eXtended).
  • Matrix - A class for doing 3D matrix math against Vector3 objects.
  • CustomRandom - Random number generator that works the same way on all platforms.
  • ExtRandom - An extension to the Unity Random class.
  • Angle - Helper class to work with angles.
  • DirectionFinder - Determines the general direction between two vectors.
  • Get Aspect Ratio - A simple function that returns an aspect ratio between two values as Vector2.
  • HexConverter - Functions for converting decimal colors to hexadecimal and back.
  • Interpolate - Interpolation utility functions for easing, Bezier splines, and Catmull-Rom splines.
  • QuaternionExtensions - A set of useful extension methods to the inbuilt Quaternion struct.
  • SphericalCoordinates - A class to manipulate an object's position with spherical coordinates instead of cartesian.
  • UnitSphere - A collection of random unit vector generating functions. (C#)

[edit] Time

  • CoroutineScheduler - A coroutine scheduler implementation. Gain a better understanding of coroutines.
  • CoroutineHelper - A collection of some helper classes to get easy access to coroutine features for delegates.
  • CoUpdate - An alternative to Update which support yield instructions. Benefit from cleaner code.
  • CustomFixedUpdate - A class that allows you to create seperate FixedUpdate callbacks are any rate you like.
  • UpdatePump - Register any method in any object to be called in one of Unity's update loops.
  • SpeedLerp - Replacements for Mathf.Lerp, InverseLerp, SmoothStep, etc. that are typically 1.5X faster or more. Also adds Vector2Lerp and SuperLerp.
  • TimeOfDay - Compute the game time into hours, minutes and seconds depending on the duration of a day.
  • GeneralTimer - A simple timer component that includes a few extra methods for ease of use.
  • QuickTimer - A poll based timer useful in "called on each frame" methods.
  • SimpleTimer - A basic non-Monobehaviour timer script that can start and pause.
  • AbortableEnumerator - Provides the ability to Stop a Coroutine without calling StopCoroutine.

[edit] UI

[edit] Editor

  • Autorun - Execute some code whenever the project is opened, recompiled, or run.
  • AutoSave - Automatically save the current scene at regular intervals.
  • FindMissingScripts - Search for broken/missing MonoBehaviors on GameObjects.
  • AddChild - Add an empty child GameObject to each selected GameObject.

[edit] Optimization

  • CombineChildrenBones - Similar to MeshMerger, this script combines MeshFilter meshes into a single skinned mesh and then tracks transform changes
  • CombineSkinnedMeshes - A Script that allows to combine multiple skinned meshes to just one SkinnedMeshRenderer. Useful for Avatar System!
  • SkinnedMeshCombiner - This script will combine skinned meshes whilst retaining their animation and texture properties.
  • SkinMeshCombineUtility - Script to work with CombineSkinnedMeshes.
  • SpriteManager - A script that allows many independently-moving 2D sprites to be drawn using a single draw call. This is particularly useful to increase iPhone performance.
  • StaticPerformanceOptimization - A script that optimizes performance statically based on the users graphics card by dropping terrain resolution and quality settings

[edit] Analytics and Testing

  • BoneDebug - Draws debug bones in a character.
  • AllocationStats - Shows how much memory your application has allocated.
  • DetectLeaks - Displays the number of allocated objects by type. Useful for finding leaks.
  • DebugConsole - A script to allow scrolling feedback from your scripts.
  • 2020/DebugConsole - An up to date (as of 2020) script to allow scrolling feedback from your scripts.
  • DebuggerX - A simple javascript singleton that allows you to send debug to the console or the GUI.
  • DebugLine - Like the Debug.DrawRay() and DrawLine() functions, but uses the lineRenderer component to draw in the Game window.
  • DrawArrow - Builds upon Debug.DrawRay() to add arrowheads at the tip.
  • NUnit - de-facto standard for unit testing in .NET
  • Profiler - Script for profiling the performance of scripts, based on tags.
  • Reporter - Delayed action system info script that could be used for support purposes.
  • UUnit - Simple xUnit framework that can be run inside Unity.
  • SharpUnit - Unit testing framework adapted from UUnit that can be run inside Unity.
  • DetectDynamicBatching - Script+shader that helps you detect which meshes are batched dynamically and which aren't.
  • GetTotalMemoryTest - Script to help illustrate Mono memory allocation mechanics. Indicates that System.GC.GetTotalMemory always changes by multiples of 4096 bytes.
  • BuildInfos - Automatic Build infos generation and usage.
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox