Assets Only Attribute

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.

[Title("Assets only")]
[AssetsOnly]
public List<GameObject> OnlyPrefabs;

[AssetsOnly]
public GameObject SomePrefab;

[AssetsOnly]
public Material MaterialAsset;

[AssetsOnly]
public MeshRenderer SomeMeshRendererOnPrefab;

[Title("Scene Objects only")]
[SceneObjectsOnly]
public List<GameObject> OnlySceneObjects;

[SceneObjectsOnly]
public GameObject SomeSceneObject;

[SceneObjectsOnly]
public MeshRenderer SomeMeshRenderer;