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

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

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


Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector

See Also


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

public MyComponent : MonoBehaviour
	public GameObject MyPrefab;