Skip to main content

Runnable Pine feature examples

Download PineFeatureExamples.cs. Import it into a project containing Pine and run PineDocs.Examples.PineFeatureExamples.Run() on the Unity main thread. It creates explicit ownership roots and disposes the resources of every example. It is an execution/reference suite; use App.cs for a lasting application screen.

The suite runs these complete examples:

MethodFeatures demonstrated
SourcesAndDerivedPrimitive/reference equality, custom comparers, eager cached derivation, mutation notification and batching.
EffectHistoryEffects, previous results, untracked reads and per-execution cleanup.
ScopeOwnershipAll Root shapes, scoped Run results, owned disposables and cleanup ordering.
ContextProvidersFallback, nearest provider, returning providers and retained callback/effect context.
ReactiveInputsLiteral/getter Value adapters, source/derived/spring conversions and Read overloads.
NativeCompositionTyped groups, generic Create, native Clone, Apply, Bind, named setters, configuration and action priority.
LayoutAndGraphicsRows, columns, fixed/reactive dimensions and positions, opacity, activity, enabled controls and colors.
EventsAndTwoWayBindingsNative click/value events, control source bindings and notification-free updates.
ChangedAndPollingInitial/distinct native values through events and clock polling.
ReactiveChildrenRetained native children, membership/order updates and external ownership.
ConditionalBranchesShow, Switch, truthy filtering, dictionary fallbacks, presence and delayed exits.
KeyedListsPositional/keyed Indexes, Values identity, reorder, replacement and exits.
MountSurfacesOwned overlay and externally parented camera/world canvas lifetimes.
SpringsAndSpacesReactive spring settings, manual stepping, controls, custom spaces and Unity value spaces.
CreationFlagsStrict diagnostics, defaults and nested group ordering.

The settings screen demonstrates every standard control and generated MonoBehaviour components. The complete reference includes an example for every public/protected declaration, including explicit mount options, exact/fill/content layout and read-only operator values.

Each method is an ordinary C# function. Keep the portions needed by your application; running the suite switches to manual clock advancement through UI.Step, so run it in a dedicated test session rather than during an automatically animated game.