AssetsOnly is used on object properties, and restricts the property to project assets, and not scene objects.

Use this when you want to ensure an object is from the project, and not from the scene.

namespace Sirenix.OdinInspector
[AttributeUsageAttribute((AttributeTargets)32767, AllowMultiple = False, Inherited = True)]
public sealed class AssetsOnlyAttribute : Attribute


Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector

See Also


The following example shows a component with a game object property, that must be a prefab from the project, and not a scene object.

public MyComponent : MonoBehaviour
	public GameObject MyPrefab;