Author : Timo Naskali

Base class for attributes that can be used to override the default data validation logic for the target. Implements IValueValidator and ITargetableAttribute interfaces. Attribute Target Field, property, indexer, method return value or method parameter. Example using System; using System.Collections.Generic; using System; using UnityEngine; namespace Sisus.Attributes { /// <summary> /// Attribute that specifies that its target ..

Read more

When added before a class member makes it be drawn as a non-editable read-only control in the inspector. Attribute Target Field, property, method or indexer. Example using Sisus.Attributes; using UnityEngine; namespace Sisus.Testing { public class Chase : MonoBehaviour { // Show in inspector but don’t allow changing the value [ShowInInspector, ReadOnly] internal Transform ChaseTarget { ..

Read more

When added before a component class will make sure that whenever the component with the attribute is added to GameObjects, at least one component matching one of the specified types is also present on the same GameObject. Attribute Target Component class Example using System; using UnityEngine; using UnityEngine.UI; using Sisus.Attributes; [RequireAnyComponent(typeof(Renderer), typeof(Graphic)), DisallowMultipleComponent] public class ..

Read more

When added before a component class prevents other components (besides the transform component) from being added into GameObjects that contain the component with this attribute. Attribute Target Component class Example using UnityEngine; using Sisus.Attributes; [OnlyComponent] public class LonelyComponent : MonoBehaviour { [ShowInInspector] const bool alone = true; } Exam..

Read more

When added before a component class causes the transform component to be hidden inside the inspector view for all GameObjects that contain the component with this attribute. Attribute Target Component class Example using UnityEngine; using Sisus.Attributes; [HideTransformInInspector, DisallowMultipleComponent] public class ReadOnlyTransform : MonoBehaviour { [ShowInInspector] public Vector3 Position { get { return transform.localPosition; } } ..

Read more

When added before a component class causes the component to be hidden inside the inspector view. Attribute Target Component class Example using UnityEngine; using Sisus.Attributes; [HideComponentInInspector] public class MyHiddenComponent : MonoBehaviour { void Start() { Debug.Log(“You can’t see me!”, this); } } Exam..

Read more

Power Inspector contains a custom-built drawer for collections that introduces multiple enhancements over the way they used to work in the default inspector. Drag & Drop Member Reordering   You can reorder members inside a collection by simply dragging them around. Dragging can be initiated by pressing the left mouse button down over the prefix ..

Read more

By default when you inspect a GameObject in Power Inspector, all its visible components are shown in a flat list in the inspector view. While this can work perfectly well in many situations, in some projects GameObjects might contain so many components that the view becomes cluttered and difficult to work with. To solve this ..

Read more

Determines whether or not should generate component categories from add component menu entries for use when categorized components mode is active. When this is enabled you can customize the categories of components using the AddComponentMenu attribute or in the preferences under Add Component Menu > Add Component Menu Config. If this is disabled, you can ..

Read more

Determines the component category to use for components when no category has been set up for them when categorized components mode is active. If you use an empty category name, then components with no category set up for them will be shown in the inspector without being grouped inside a catego..

Read more