Unity 4 incoming feature: Property Drawers

Another great feature that will come with Unity 4 is the property attributes/drawers.

By adding specific attributes on your component fields, you can use custom property drawers in the inspector. Look at the image above to see an example of what you can achieve with this system.

This is done in 3 steps:

  1. Define an “attribute class” inheriting from PropertyAttribute where you declare the data you will need (parameters to check the validity of your field, help messages, etc)
  2. Define a “drawer class” inheriting from ProperyDrawer where you define the behavior of the editor (how to display your field, how to validate the value user will input, etc)
  3. Add the attribute to your field with the parameters you defined in step 1

Use can even use it on “Serializable” classes.

More details and source code examples on Unity’s blog post: http://blogs.unity3d.com/2012/09/07/property-drawers-in-unity-4/

Brace yourself, Unity 4 is coming…

Here is the news of the day: David Helgason (CEO) and Joachim Ante (CTO) announced the upcoming release of Unity 4 in their latest youtube video.

This major update will introduce 2 huge features:

First, “Mecanim”, their new character animation system featuring AAA quality functionalities like blend trees and state machines editor, dynamic animation retargeting, etc. More details in this video:

Another big step for Unity toward the AAA scene when you add to it improved lightmapping, DirectX 11 and shader model 5 support.

And the other long awaited feature, “La surprise du chef”, is LINUX DEPLOYMENT!!!

Potentially a long term relief for projects having to handle Unity based game servers… (only possible on windows platform until today)

More details about Unity 4 on the official homepage/slideshow, the marketwire post and the official FAQ.

 Scroll to top