Summary
A group of details relating to an
Weaver.AssetInjectionAttribute
which allow its target asset to be
procedurally generated.
- Assembly
- Weaver
.dll - Namespace
- Weaver
.Editor .Procedural - Interfaces
-
- IDependant
<ProceduralAsset> - IHasCustomMenu
- IDependant
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IDependant<ProceduralAsset>"]
Type-.->Interface1["IHasCustomMenu"]
Type["ProceduralAsset"]
class Type type-node
Syntax
public sealed class ProceduralAsset : IDependant<ProceduralAsset>, IHasCustomMenu
Events
Name | Type | Summary |
---|---|---|
OnImportAsset | Action |
[Editor-Only]
This callback is cleared before generation begins and triggered after the asset generates and is saved.
static
|
Fields
Name | Constant Value | Summary |
---|---|---|
AssetGenerator |
[Editor-Only] The
Weaver.Editor.Procedural.ProceduralAsset.AssetGenerator that will be used to generate and save the asset. |
|
GeneratorMethod |
[Editor-Only] The method that will be used to generate the asset.
|
|
Injector |
[Editor-Only] The target
Weaver.AssetInjectionAttribute . |
|
ProceduralAttribute |
[Editor-Only] The target
Weaver.ProceduralAssetAttribute . |
Properties
Name | Value | Summary |
---|---|---|
AllProceduralAssets | List |
[Editor-Only]
A list of every
Weaver.Editor.Procedural.ProceduralAsset .
static
|
CurrentAssetPath | string |
[Editor Only]
The asset path at which the currently generating asset will be saved.
static
|
Dependancies | IEnumerable |
[Editor-Only] Other assets which must always be generated before this one.
|
Methods
Name | Value | Summary |
---|---|---|
AddItemsToMenu |
void |
[Editor-Only]
Adds various functions for this asset to the `menu`.
|
Check |
void |
[Editor-Only]
If there are any procedural assets which don't currently have a target asset, this method asks the user
what they want to do about it.
static
|
DoGUI |
void |
[Editor-Only]
Draws the GUI for this attribute in the inspector.
|
Generate |
void |
[Editor-Only]
Generates this procedural asset.
|
Generate |
void |
[Editor-Only]
Generates the procedural asset associated with the specified `generatorMethod`.
static
|
GenerateAll |
void |
[Editor-Only]
Generates every procedural asset in the project.
static
|
GenerateNamespace |
void |
[Editor-Only]
Generates every procedural asset in the specified `nameSpace`.
static
|
GetFromGenerator |
ProceduralAsset |
[Editor-Only]
Returns the
Weaver.Editor.Procedural.ProceduralAsset which uses the specified `generatorMethod` (if any).
static
|
GetFromGenerator |
ProceduralAsset |
[Editor-Only]
Returns the
Weaver.Editor.Procedural.ProceduralAsset which uses the specified `generatorMethod` (if any).
static
|
GetRealFileName |
string |
Returns the
Weaver.AssetInjectionAttribute.FileName if one was specified. Otherwise returns the full
name of the Weaver.InjectionAttribute.Member ; with or without the namespace depending on the
Weaver.Editor.ProceduralAssetSettings.includeNamespaceInName setting.
|
GrabDependancy |
T |
Marks the currently generating asset as requiring the specified `dependancy` so that whenever either is
generated, the dependancy is generated first. Then returns the target asset of that `dependancy`.
This method can only be called while an asset is being generated. Otherwise it throws an
System.InvalidOperationException .
static
|
GrabDependancy |
T |
Marks the currently generating asset as requiring the specified `dependancy` so that whenever either is
generated, the dependancy is generated first. Then returns the target asset of that `dependancy`.
This method can only be called while an asset is being generated. Otherwise it throws an
System.InvalidOperationException .
static
|
GrabDependancy |
T |
Marks the currently generating asset as requiring the specified `dependancy` so that whenever either is
generated, the dependancy is generated first. Then returns the target asset of that `dependancy`.
This method can only be called while an asset is being generated. Otherwise it throws an
System.InvalidOperationException .
static
|
MarkDependancy |
void |
[Editor-Conditional]
Marks the currently generating asset as requiring the specified `dependancy` so that whenever either is
generated, the dependancy is generated first.
static
|
MarkDependancy |
void |
[Editor-Conditional]
Marks the currently generating asset as requiring the specified `dependancy` so that whenever either is
generated, the dependancy is generated first.
static
|
MarkDependancy |
void |
[Editor-Conditional]
Marks the currently generating asset as requiring the specified `dependancy` so that whenever either is
generated, the dependancy is generated first.
static
|
ShouldGenerate |
bool |
[Editor-Only]
Determines whether this asset should generate its asset at the moment.
|
ShouldShow |
bool |
[Editor-Only]
Determines whether this asset should be shown in the
Weaver.Editor.Window.WeaverWindow at the moment.
|
ToString |
string |
[Editor-Only]
Returns a string describing this
Weaver.Editor.Procedural.ProceduralAsset .
|
TryCreate |
ProceduralAsset |
[Editor-Only]
If the `injector`s attributed member has a
Weaver.ProceduralAssetAttribute this method tries to find
a suitable Weaver.Editor.Procedural.AssetGenerator and generator method. If successful, it creates and
returns a Weaver.Editor.Procedural.ProceduralAsset containing those details.
static
|