Extension Methods

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page as part of the Extensions page retro fit. See discussion page at http://wiki.unity3d.com/index.php/Extensions for details)
 
m (Added link to the "TextureFloodFill" page)
Line 27: Line 27:
 
*[[LayerMaskExtensions]] - This C# class gives simple extension access to manipulating and debugging LayerMasks.  
 
*[[LayerMaskExtensions]] - This C# class gives simple extension access to manipulating and debugging LayerMasks.  
 
*[[QuaternionExtensions]] - This script provide a few useful extensions to the inbuilt 'Quaternion' struct.  
 
*[[QuaternionExtensions]] - This script provide a few useful extensions to the inbuilt 'Quaternion' struct.  
 
+
*[[TextureFloodFill]] - Two extension methods for Texture2D which allows you to perform a floodfill operation on the texture.
 
|}
 
|}
 
<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 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;">

Revision as of 21:32, 13 November 2013

Plugins   Extension Methods   Packages

Contents

Extension methods extend existing functionality to existing types.

C#

  • EnumExtensions - This script provides an instance TryParse method for .Net's System.Enum class.
  • GetOrAddComponent - Simple method extension to save 2 or 3 lines of very redundant and ugly code. It will check if component exists before adding new one.
  • IsVisibleFrom - This C# class gives simple extension access to checking if an Renderer is rendered by a specific Camera.
  • LayerMaskExtensions - This C# class gives simple extension access to manipulating and debugging LayerMasks.
  • QuaternionExtensions - This script provide a few useful extensions to the inbuilt 'Quaternion' struct.
  • TextureFloodFill - Two extension methods for Texture2D which allows you to perform a floodfill operation on the texture.
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox