Skip to content

JunglePreset

Asset-based preset that stores a pre-configured SerializeReference value for polymorphic fields.

Namespace: Jungle.Presets
Inherits: ScriptableObject

Overview

JunglePreset works like Unity's built-in Preset system but for [SerializeReference] polymorphic fields. Create one from the asset menu, assign a configured value, and reuse it across components via the TypeSelectableField UI.

Properties

Property Type Description
baseTypeAssemblyQualifiedName string Assembly-qualified name of the base type this preset targets.
presetValue object The stored [SerializeReference] value.

Runtime API

Member Type Description
BaseType Type The base type this preset targets.
Value object The stored preset value.
ValueType Type The concrete type of the stored value.

Methods

Method Description
SetData(object, Type) Initialize the preset with a value and base type.
IsCompatibleWith(Type) Returns true if the stored value is assignable to the given base type.

See Also