An abstract class in Root.Township, Alta.Caves.PluginParts.
Base asset for one part of a cave generator plugin. It makes a MapGeneratorPartInstance for each plugin run.
- Listed in World generation
- Inherits or implements
GeneralValue
- Derived types
ApplyElement, BlobEdge, Blur, CellularAutomata, Circle, CopyPart, Curve, LogRange, Mask, OperationPart, RandomNoise, RoofHole, RoomFixes, SimplexNoisePart, Stretch
Constructors
| Member | What it is |
|---|
protected MapGeneratorPart() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private Plugin overrideTarget | Backing field for OverrideTarget, the plugin the part works on instead of its own plugin. Null means its own. |
private int partIdentifier | Backing field for PartIdentifier, hashed into the instance's seed. Set from the asset's instance id when negative. |
Properties
| Member | What it is |
|---|
Plugin OverrideTarget { get; } | Plugin whose layer this part writes to instead of its own plugin. Null means the owning plugin. |
int PartIdentifier { get; } | Seed value for the part. Generated from the instance ID when missing. |
Methods
| Member | What it is |
|---|
abstract IPartInstance GetInstance(PluginInstance plugin) | Creates the runtime instance of this part for a plugin instance. |
void RegenerateIdentifier() | Sets the identifier from the asset's instance ID. |
1 private and internal method
| Member | What it is |
|---|
private void OnValidate() | Editor: gives the part an identifier if it has none. |
Used in
Members of other types that take, return or hold a MapGeneratorPart: