Extension Methods

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
m (Updated page links and improved text.)
m (Isaiah Kelly moved page Extension/Methods to Extension Methods: Forward slash unnecessary and probably bad practice.)

Latest revision as of 20:27, 7 February 2019

Plugins   Extension Methods   Packages

Extension methods extend functionality of existing types.

  • EditorGUIExtension - Some extensions to make coding the GUI for utilities/custom inspectors easier.
  • Enum.TryParse - Provides an instance TryParse method for enumerations.
  • GenericMenuExtensions - Allows you to cleanly add items to GenericMenu instances using chained method calls.
  • GetOrAddComponent - Simple extension to save 2 or 3 lines of very redundant and ugly code.
  • IsVisibleFrom - For checking if a Renderer is rendered by a specific Camera.
  • LayerMaskExtensions - For manipulating and debugging LayerMasks.
  • QuaternionExtensions - Provides a few useful extensions to the 'Quaternion' struct.
  • TextureFloodFill - Two methods for Texture2D which allows you to perform a floodfill operation on the texture.
Personal tools