Summary
[Editor-Only]
    An 
		Weaver.Editor.Procedural.AssetGenerator which saves UnityEngine.GameObjects and UnityEngine.Components as prefabs.
    - Assembly
 - Weaver
.dll  - Namespace
 - Weaver
.Editor .Procedural  - Base Types
 - 
									
- Object
 - AssetGenerator
 
 
							graph BT
	Type-->Base0["AssetGenerator"]
	click Base0 "/weaver/api/Weaver.Editor.Procedural/AssetGenerator"
	Base0-->Base1["Object"]
	Type["PrefabGenerator"]
class Type type-node
						
					Syntax
[AssetGenerator(typeof(GameObject))]
[AssetGenerator(typeof(Component))]
public class PrefabGenerator : AssetGenerator
	Attributes
| Type | Description | 
|---|---|
| Asset | 
						[Editor-Only]
    Specifies which asset type can be generated by the attributed class (which must inherit from
    Weaver.Editor.Procedural.AssetGenerator).
     | 
					
| Asset | 
						[Editor-Only]
    Specifies which asset type can be generated by the attributed class (which must inherit from
    Weaver.Editor.Procedural.AssetGenerator).
     | 
					
Properties
| Name | Value | Summary | 
|---|---|---|
| DefaultFileExtension | string | 
									 .prefab 
								 | 
							
| Generator | 
								Type[] | 
									 
    The parameter types of a generator method for this asset type. When overriding this property, consider
    using  
											Weaver.ReflectionUtilities.OneType(System.Type) or Weaver.ReflectionUtilities.TwoTypes(System.Type,System.Type).
    Inherited from AssetGenerator 
								 | 
							
| Generator | 
								Type | 
									 The default return type for generator methods used by this generator. 
								 | 
							
| HowToCancel | string | 
									 Explains how to cancel the generation of an asset (for  
											Weaver.Editor.Procedural.AssetGenerator.AppendFullDescription(System.Text.StringBuilder)).Inherited from AssetGenerator 
								 | 
							
Methods
| Name | Value | Summary | 
|---|---|---|
| AddItemsToMenu | 
								void | 
									 Populates `menu` with various items for the context menu of `asset`. 
											Inherited from AssetGenerator 
								 | 
							
| Append | 
								void | 
									 Appends the full description of this  
											Weaver.Editor.Procedural.AssetGenerator and how it is to be used.Inherited from AssetGenerator 
								 | 
							
| Destroy | 
								void | 
									 
    Destroys the specified `obj`.
    If it is a  
								UnityEngine.Component, this method destroys its UnityEngine.Component.gameObject instead.
     | 
							
| Get | 
								string | 
									 
    Gets the asset path of the existing asset and destroys all of its sub-assets.
     
											Inherited from AssetGenerator 
								 | 
							
| GetGeneratorMethod | 
								MethodInfo | 
									 Attempts to find the generator method assofiated with `assetField`. 
											Inherited from AssetGenerator 
								 | 
							
| GetGeneratorMethod | 
								MethodInfo | 
									 
    Finds the generator method associated with a particular procedural asset.
     
											Inherited from AssetGenerator 
								 | 
							
| GetMethod | 
								MethodInfo | 
									 
    Finds the generator method associated with a particular procedural asset.
     
											Inherited from AssetGenerator 
								 | 
							
| Invoke | 
								Object | 
									 Invokes `asset.GeneratorMethod` with the correct parameters for this  
								Weaver.Editor.Procedural.AssetGenerator. | 
							
| Save | 
								void | 
									 Saves `obj` as a prefab at `assetPath`. 
								 | 
							
| SaveDefaultAsset | 
								void | 
									 Creates and saves an empty prefab to save sub assets inside while the asset is still generating. 
								 | 
							
| UseTempScene | 
								bool | 
									 
    Indicates whether a temporary scene should be opened while generating the specified `asset`.
    Returns true because prefabs should always be generated in a temporary scene.
     
								 | 
							
| Validate | 
								bool | 
									 Checks if return type of a generator method is valid for this generator type. 
								 |