Attribute that specifies that targeted string type class member should be drawn in the inspector using the specified GUIStyle. Attribute Target Field or property. Example using UnityEngine; using Sisus; using Sisus.Attributes; public class StickyNote : MonoBehaviour { [Style(“VCS_StickyNote”), TextArea] public string note = “(Add note here)”; } Exam..
Category : 06. Attributes
Attribute that can be used to specify which drawer should be responsible for drawing the target class or class member in the inspector. When you add this attribute to a class member, that class member will be drawn using the specified drawer, but only inside the class that holds the class member. When you add ..
Attribute that can be used to make class member that follows the attribute be shown in the inspector. Unlike Unity’s built-in SerializeField and SerializeReference attributes this can also be used to display non-serialized fields. It also supports exposing properties and methods in addition to fields. For more information see the display anything feature page. Note: ..
Adds some spacing in the Inspector. This is just like Unity’s built-in Space attribute except that it supports targeting of properties and methods in addition to fields. PSpace Adds some spacing in the Inspector. PSpace(float height) Adds specified amount of spacing in pixels in the Inspector. Attribute Target Field, property, method o..
Makes target field or property be shown as a slider in the inspector. This is just like Unity’s built-in Range attribute except that it supports targeting of properties in addition to fields. PRange(float minValue, float maxValue) Makes target class member be shown as a slider that allows adjusting value between given minimum and maximum values. ..
When added before a collection type class member, indicates that the value of any of its members can not be null. Any member whose value is null will be highlighted with red color in the inspector view. Attribute Target Field, property, indexer, method return value or method parameter. Target type must be a collection of ..
When added before a component class causes the transform component to be locked to default state in the inspector for all GameObjects that contain the component with this attribute. This means that the local position and rotation of the transform will always remain at (0, 0, 0), and the local scale will always remain at ..
Adds a tooltip above the target in the Inspector. This is just like Unity’s built-in Tooltip attribute except that it supports targeting of properties and methods in addition to fields. PTooltip(string tooltip) Adds the given tooltip text to a field, property or a method in the inspector. PTooltip(params string[] tooltipLines) Adds the given tooltip text ..
Adds a header above the target in the Inspector. This is just like Unity’s built-in Header attribute except that it supports targeting of properties and methods in addition to fields. It also includes a couple of convenient constructors that make it easier to do some types of headers. PHeader(string header) Adds the given header text ..
Attribute that can be used to make class member that follows the attribute be shown as disabled (read-only) when a predicate statement is true. DisableIf(string classMemberName, object requiredValue) When this constructor is used, the target is disabled if the class member with the given name has the specified value. DisableIf(string classMemberName, Is comparison, object requiredValue) ..