Cuidado
Pacote depreciado e substituído por - melhores atributos

Este pacote fornece os seguintes recursos:
Este pacote contém classe base para gaveta com melhor suspensão.
Melhor suspensão contém:
Fornece possibilidade de selecionar a implementação da interface, o valor enum com melhor suspensão no inspetor de unidade.
Também suporta enums de bandeira .
Uso:
[ Select ] [ SerializeReference ]
private ISomeInterface someInterface ;
[ Select ] [ SerializeReference ]
private SomeAbstractClass someAbstractClass ;
[ Select ( typeof ( SomeAbstractClass ) ) ] [ SerializeReference ]
private List < SomeAbstractClass > someAbstractClasses ;
[ Select ( typeof ( ISomeInterface ) ) ] [ SerializeReference ]
private List < ISomeInterface > someInterfaces ;
[ Select ] [ SerializeField ]
private KeyCode keyCode ; Semelhante para selecionar o atributo, mas permite definir sua própria coleção de seleção.
Uso:
[ Dropdown ( "Method()" ) ] [ SerializeField ]
private List < int > someInts ;
[ Dropdown ( "Method()" ) ] [ SerializeField ]
private List < int > someInts ; Suporta a recuperação de informações de outras classes, para usar esta opção Start selectorName com r: .
Uso:
[ Dropdown ( "r:OtherClass.StaticFieldOrProperty" ) ] [ SerializeField ]
private List < int > someInts ;
[ Dropdown ( "r:OtherClass.StaticMethod()" ) ] [ SerializeField ]
private List < int > someInts ;
[ Dropdown ( "r:Singleton.Instance.Method()" ) ] [ SerializeField ]
private List < int > someInts ;
[ Dropdown ( "r:Singleton.Instance.Method()" ) ] [ SerializeField ]
private List < int > someInts ; Fornece possibilidade para ver a visualização do objeto clicando no campo no inspetor de unidade.
Suporta visualização para objetos de cena e objeto Prefabs , bem como texturas e sprites .
Uso:
[ Preview ] [ SerializeField ]
private Sprite sprite ;
[ Preview ] [ SerializeField ]
private SomeMonobehaviour someMonobehaviour ; Fornece possibilidade para desativar a modificação dos campos no inspetor de unidade, mas mantê -lo exibido.
Uso:
[ ReadOnlyField ] [ SerializeField ]
private SomeClass someClass ;
[ ReadOnlyField ] [ SerializeField ]
private float someFloat ;
[ ReadOnlyField ] [ TextArea ( 5 , 10 ) ] [ SerializeField ]
private string someString ; Fornece possibilidade de desenhar textura completa sobre o campo no inspetor de unidade. Para obter textura Guid Open TextureImport Janela e menu de contexto aberto à direita -> Converse para o icoNHeaderattribute.
Uso:
[ IconHeader ( "TEXTURE_GUID" ) ] [ SerializeField ]
private string oldName ; Fornece possibilidade de desenhar inspetor completo abaixo do campo com o tipo Ineretex do UnityEngine.Object.
Uso:
[ DrawInspector ] [ SerializeField ]
private SomeScriptable scriptable ; Fornece possibilidade de renomear o rótulo no Unity Inspetor.
Uso:
[ RenameField ( "New Name" ) ] [ SerializeField ]
private string oldName ; Fornece possibilidade de definir valor para o Vector3/Vector2/Quaternion/limites da vista da cena arrastando alças.
[GizmoLocal] funciona apenas no inspetor de unidade MonoBehaviour .
Uso:
[ Gizmo ]
[ SerializeField ] private Bounds bounds ;
[ Gizmo ]
[ SerializeField ] private Vector3 vector3 ;
[ Gizmo ]
[ SerializeField ] private Quaternion quaternion ;
[ GizmoLocal ]
[ SerializeField ] private Bounds boundsLocal ;
[ GizmoLocal ]
[ SerializeField ] private Vector3 vector3Local ;
[ GizmoLocal ]
[ SerializeField ] private Quaternion quaternionLocal ; Fornece possibilidade de exibir o botão para método no inspetor de unidade.
Usos:
///Default usage of attribute.
[ EditorButton ]
private void SomeMethod ( )
{
//Some code.
}
///This button will call method with predefined parameters.
///When invokeParams not specified will call with null.
[ EditorButton ( invokeParams : 10f ) ]
private void SomeMethod ( float floatValue )
{
//Some code.
}
///This button will call method with predefined parameters.
///When invokeParams not specified will call with null.
[ EditorButton ( invokeParams : new object [ ] { 10f , 10 } ) ]
private void SomeMethod ( float floatValue , int intValue )
{
//Some code.
}
/// This button will be in the same row with button for SomeMethod2.
/// But will be in the second position.
/// When captureGroup not specified each button placed in separate row.
/// When priority not specified buttons in one row sorted by order in code.
[ EditorButton ( captureGroup : 1 , priority : 2 ) ]
private void SomeMethod1 ( )
{
//Some code.
}
[ EditorButton ( captureGroup : 1 , priority : 1 ) ]
private void SomeMethod2 ( )
{
//Some code.
}
/// This button will have name "Some Cool Button".
/// When displayName not specified or null/empty/whitespace button
/// will have name same as method.
[ EditorButton ( displayName : "Some Cool Button" ) ]
private void SomeMethod ( )
{
//Some code
} Você pode verificar os construtores para EditorButtonAttribute lá mais opções específicas.
Como instalar