Try placing one plant from a script

Create a C# script named PlaceOnePlant, replace its contents with the example below, then attach it to an empty GameObject. In that object's Inspector, drag your Vegetation Area into the Area field. Move the object inside the Area and press Play. It places the first plant type at the object's position.

A complete first script

using UnityEngine;
using Modern2DVegetation;

public class PlaceOnePlant : MonoBehaviour
{
    public VegetationArea area;

    void Start()
    {
        if (area == null) return;
        VegetationAPI.Place(area, transform.position, typeIndex: 0, seed: 1234);
    }
}

typeIndex is the plant's position in the Type Set list: the first entry is 0, the second is 1, and so on. The seed is a number used to choose repeatable variation. Use different seeds for different plants. A false return means the plant was not accepted, for example because the Area or plant type is missing.

Namespace

The examples further down are pieces to add to your own game scripts. They are not complete scripts. area is the Vegetation Area you assigned; worldPosition, hitPoint and similar names are positions supplied by your game, such as where a mouse ray hit the ground. Plant positions use the scene's X and Y coordinates, not screen pixels.

Basic setup

using Modern2DVegetation;

Bend, Pulse and persistent state

Interactions

VegetationAPI.Bend(transform.position, move.normalized, 0.8f, 1.2f, 0.35f);
VegetationAPI.Pulse(explosionPoint, 1.5f, 2.5f, 0.55f);

VegetationInteractionHandle cut = VegetationAPI.Cut(hitPoint, 1.2f, remainingHeight: 0.15f);
VegetationInteractionHandle destroyed = VegetationAPI.Destroy(hitPoint, 1.5f);
VegetationInteractionHandle grow = VegetationAPI.Grow(hitPoint, 1.5f, duration: 0.7f);
VegetationAPI.Regrow(hitPoint, 2.0f, duration: 0.8f);

if (cut.IsValid) cut.Stop();

Shape-aware actions

Primitive shape snapshot

VegetationInteractionShapeSnapshot shape = VegetationInteractionShapeSnapshot.Circle(hitPoint, 1.5f);
VegetationAPI.Cut(shape, remainingHeight: 0.2f, falloff: 4f);
VegetationAPI.Pulse(shape, strength: 1.2f, duration: 0.4f, falloff: 2f);

For Collider2D shapes use VegetationInteractionGeometry.FromCollider(collider). Persistent/timed actions take ownership of polygon snapshot data, so later caller-array or transform changes do not mutate an already-issued action.

Wind

Global wind

VegetationAPI.SetGlobalWind(Vector2.right, strength: 0.7f, speed: 1.2f);
VegetationAPI.SetWindDirectionalResponse(1.0f, 0.35f, 0.25f);

Appearance

Color and shadows

VegetationAPI.SetGlobalTint(area, new Color(0.9f, 0.82f, 0.72f));
VegetationAPI.SetGlobalVegetationGradient(area, true, bottom, top, 0.8f);
VegetationAPI.SetVegetationShadowsEnabled(area, true);
VegetationAPI.SetGlobalTimeOfDay(area, 16.5f);
VegetationAPI.SetGlobalBlobShadowShape(area, 1.35f, 0.55f, 0.4f);

Placement, harvesting and feedback

Feedback-aware world editing

VegetationMutationResult placed = VegetationAPI.PlaceWithFeedback(area, worldPosition, typeIndex, seed: 1234);
VegetationMutationResult scatter = VegetationAPI.PaintWithFeedback(area, worldPosition, 2f, typeIndex, count: 30, seed: 1234);
VegetationMutationResult harvested = VegetationAPI.Harvest(area, worldPosition, radius: 1.5f);

foreach (VegetationTypeCount item in harvested.perType)
    Debug.Log($"Harvested {item.count} of {item.typeId}");

Use PlaceWithFeedback for one plant, or PaintWithFeedback to scatter several plants around a point. Their result tells you how many plants were requested and how many were actually placed. Harvest removes manually planted vegetation and reports how many of each plant type it removed, which is useful for awarding items. For simple actions, Place, Paint and Erase are also available.

Queries and Destroy feedback

Count / interaction feedback

VegetationInstanceCountResult nearby = VegetationAPI.GetVisibleInstanceCounts(area, worldPosition, 2f);
VegetationInteractionMutationResult destroyed = VegetationAPI.DestroyWithFeedback(area, worldPosition, 2f);

Debug.Log($"Visible targets: {destroyed.affectedInstances.totalCount}");

DestroyWithFeedback tells you how many visible plants were affected by the Destroy effect. The effect hides or collapses them, but their placement records remain. Use Harvest when collecting a crop should remove the planted crop itself.

What you can paint before and during Play

While Play is stopped, use Density to paint how thick the grass should be, Noise to fill an area with a pattern, Color to tint plants, and Placement Mask to hide plants in selected places. Finish these painted maps before pressing Play. During Play, use Runtime Painter or the placement API to add and remove individual plants; you cannot repaint those four maps.

Check the painted mask

// 0 means the painted mask does not hide plants here.
// 1 means it hides all plants here. Values between hide some plants.
float hiddenAmount = VegetationAPI.SamplePaintedPlacementMask(area, worldPosition);

// Checks placement rules such as blocking sprites.
bool canPlace = VegetationAPI.IsPlacementAllowed(area, worldPosition);

The painted mask hides plants without deleting them. Removing the mask reveals them again. It does not prevent a placement from being stored, so canPlace and hiddenAmount answer different questions. Use Harvest or Erase when you want to remove plants rather than hide them.