Publisher | Jesse Stiller |
---|---|
File size | 157.86kB |
Number of files | 10 |
Latest version | 1.0.1 |
Latest release date | 2021-02-08 08:57:17 |
First release date | 2018-05-23 09:00:33 |
Supported Unity versions | 2018.4.2 or higher |
Phlayer makes working with layers attached to game objects fast, safe and automatic (in more ways than one).
Layers in Unity are very powerful, they can be used to differentiate objects about as quickly as possible for a computer. And they are widely used in physics engine queries such as raycasts.
There's a very big problem with layers in Unity without Phlayer however, they are stored internally in an asset which can only be accessed indirectly. Not only is this slower than how it can be, but there can be outdated references which can cause painful bugs to arise, and more.
Phlayer solves this by automatically generating a script containing all of the layers each time they are edited in the Layer Inspector. Here are all the benefits that Phlayer brings:
> Robustness - compiler time errors will be generated when layers have been changed but code has not. There won't be any unexpected bugs to track down
> Performance - integer based operations will generally always be quicker than ones with strings of characters.
> Memory usage - while it makes a small difference, storing multiple 32-bit integers will usually use a little less memory than storing strings of characters.
> Code completion - since the layers are simply fields of a class, Phlayer works with any IDE with code completion
> Peace of mind - knowing that the automatic layer class is always kept in sync, and never requires you to update it ever again
> Sake of principle - it just makes sense that something as simple as layer logic is implemented with the lowest overhead possible because it's dead simple.
> Automated - isn't that worth mentioning again?
Layers in Unity are very powerful, they can be used to differentiate objects about as quickly as possible for a computer. And they are widely used in physics engine queries such as raycasts.
There's a very big problem with layers in Unity without Phlayer however, they are stored internally in an asset which can only be accessed indirectly. Not only is this slower than how it can be, but there can be outdated references which can cause painful bugs to arise, and more.
Phlayer solves this by automatically generating a script containing all of the layers each time they are edited in the Layer Inspector. Here are all the benefits that Phlayer brings:
> Robustness - compiler time errors will be generated when layers have been changed but code has not. There won't be any unexpected bugs to track down
> Performance - integer based operations will generally always be quicker than ones with strings of characters.
> Memory usage - while it makes a small difference, storing multiple 32-bit integers will usually use a little less memory than storing strings of characters.
> Code completion - since the layers are simply fields of a class, Phlayer works with any IDE with code completion
> Peace of mind - knowing that the automatic layer class is always kept in sync, and never requires you to update it ever again
> Sake of principle - it just makes sense that something as simple as layer logic is implemented with the lowest overhead possible because it's dead simple.
> Automated - isn't that worth mentioning again?