Weaver.dll Assembly

Class Types

Class Summary
AnimationReferenceAttribute Marks a string or int field to show a popup menu in the inspector which lets you select an animation value name or hash respectively. Values include both states and parameters.

WARNING: selecting a value using this attribute does not link the field to that state or parameter. Renaming the state or parameter will NOT automatically update the value of the attributed field.

If you're interested in an animation system which avoids the need for these weak unsafe references entirely, you should check out Animancer.
AnimationsPanel [Editor-Only, Internal] A Weaver.Editor.Window.ProceduralScriptPanel containing the details of the procedural Animations script.
AnimationsScriptBuilder [Editor-Only, Internal] Scans your project for all UnityEditor.Animations.AnimatorController assets to gather the hashes of all states and parameters then procedurally generates a script containing constants wrapper methods for each of them.
Asset<T> A wrapper which simplifies the process of lazy loading and caching resources and other assets, i.e. only loading them when they are first needed instead of on startup.
AssetGenerator [Editor-Only] Base class for systems which manage aspects of procedural asset generation that are unique to certain asset types: determining the asset path, finding and invoking the generator method, and saving the generated asset.
AssetGeneratorAttribute [Editor-Only] Specifies which asset type can be generated by the attributed class (which must inherit from Weaver.Editor.Procedural.AssetGenerator).
AssetInjectionAttribute An Weaver.InjectionAttribute for attributes that inject an asset reference.
AssetInstanceAttribute An Weaver.AssetInjectionAttribute which instantiates a copy of the target asset and assigns the copy to the attributed member.
AssetList A UnityEngine.ScriptableObject containing a list automatically populated with all assets of a given type in a specific folder. Gathering takes place in the Unity Editor so the list can be loaded efficiently at runtime.
AssetList<T> An Weaver.AssetList that serializes direct references to the target assets.
AssetListBase A UnityEngine.ScriptableObject containing a list which is automatically populated with all assets of a given type in a specific folder. Gathering takes place in the Unity Editor so the list can be loaded efficiently at runtime and the target assets do not need to be in a Resources folder.
AssetListEditor [Editor-Only] A custom UnityEditor.Editor for Weaver.AssetListBase.
AssetListGenerator [Editor-Only] An Weaver.Editor.Procedural.AssetGenerator which saves asset lists.
AssetPoolAttribute An Weaver.AssetInjectionAttribute which assigns an Weaver.ObjectPool`1 to the attributed member that creates new items by instantiating copies of the target asset.
AssetPostprocessor [Editor-Only, Internal] Exposes an event that is called whenever an asset is imported, deleted, or moved.
AssetReferenceAttribute An Weaver.AssetInjectionAttribute which assigns the target asset directly to the attributed member.
BillboardManager Controls the rotation of any objects it is given to make them constantly face its Weaver.Examples.BillboardManager.Transform
Building A simple destructible building for Example 05 Missile Command which also serves as an example of how to create a procedural asset.
CachedTypeInfo [Editor-Only] Encapsulates information about a Weaver.Editor.Procedural.Scripting.CachedTypeInfo.Type for easy access and efficient reuse.
ConstructorBuilder [Editor-Only] Manages the details for building a constructor in a procedural C# script.
Conversation A simple sequence that shows a series of pre-defined lines as speech text above specific objects as if they were having a conversation.
CSharp A variety of methods relating to C# code.
CSharpProcedural [Editor-Only] A variety of methods relating to procedurally generating C# code.
DamageOnContact Shows a Weaver.Examples.FloatingText as if damage were being dealt whenever a collision is detected.
DamageSystem A set of simple methods which use Weaver.Examples.IDealDamage and Weaver.Examples.ITakeDamage to pass simple damage messages around.
EditorPrefAttribute An Weaver.InjectionAttribute which saves and loads the value of the attributed member in UnityEditor.EditorPrefs.
ElementBuilder [Editor-Only] Base class for building any element in a procedural script such as namespaces, types, fields, etc.
ElementBuilderGroupExtensions Various extension methods for Weaver.Editor.Procedural.Scripting.IElementBuilderGroup.
Explosion A simple spherical explosion which grows then shrinks over time and uses the Weaver.Examples.DamageSystem to notify objects that it hits.
FieldBuilder [Editor-Only] Manages the details for building a field in a procedural C# script.
FloatingText A Weaver.PoolableBehaviour`1 which manages a text object in the scene. This base class is a facade to allow implementations such as Weaver.Examples.FloatingTextUnity to use any text system.
FloatingTextBounce Causes the UnityEngine.Transform.localScale of a Weaver.Examples.FloatingText to smoothly bounce in and out over the course of its lifetime using a sine curve.
FloatingTextExtensions Extension methods for Weaver.Examples.FloatingText.
FloatingTextFade Causes a Weaver.Examples.FloatingText.Color to fade its alpha value from 1 to 0 over the course of its lifetime.
FloatingTextTypewriter Causes a Weaver.Examples.FloatingText to gradually show each of its character one at a time with a short delay.
FloatingTextUnity A Weaver.Examples.FloatingText that uses Unity's inbuilt UnityEngine.TextMesh component.
FollowMouse Constantly accelerates a UnityEngine.Rigidbody towards the mouse cursor on the XZ plane.
FrameRate A system that uses a Weaver.Examples.FrameRate.Text component to display the current Frame Rate (Frames Per Second). The displayed value is updated once per second.
GameOverScreen Pauses the game when shown and has a function to reload the current scene.

The Weaver.Examples.GameOverScreen.Prefab field serves as an example of Lazy Asset Injection.
InjectionAttribute Base class for attributes which define behaviours for automatically injecting values into static properties.
InjectorScriptBuilder [Editor-Only] A system for handling the build process so that members with Weaver.InjectionAttributes can be initialized efficiently in a runtime build.
Item An item that can be purchased from a shop.

This class could contain any kind of functionality, but for the purpose of this simple example it just holds the meta-data.
ItemDisplay A group of UI components which display the details of an Weaver.Examples.Item.
ItemList A Weaver.MetaAssetList`2 of Weaver.Examples.Item prefabs and their Weaver.Examples.ItemMetaData.
ItemShop Initializes an Weaver.Examples.ItemDisplay for each item in an Weaver.ItemList.
LayersPanel [Editor-Only, Internal] A Weaver.Editor.Window.ProceduralScriptPanel containing the details of the procedural Layers script.
LayersScriptBuilder [Editor-Only, Internal] Procedurally generates a script containing constants corresponding to the physics layers in your project.
LazyAssetList<T> An Weaver.AssetList that serializes resource paths so that assets don't need to be loaded until they are first accessed.
MemberBuilder [Editor-Only] Base class for building a particular type of member in a procedural C# script.
MeshBuilder Encapsulates lists of vertices, normals, etc. to simplify the procedural generation of meshes.

To use: simply add elements to the lists (Weaver.MeshBuilder.Vertices, Weaver.MeshBuilder.Indices, Weaver.MeshBuilder.UVs, etc.) then call any of the Compile() overloads. You can also implicitly cast a Weaver.MeshBuilder to a UnityEngine.Mesh.

You can efficiently reuse a Weaver.MeshBuilder by calling Weaver.MeshBuilder.Clear.
MeshUtilities Various utility methods for using the Weaver.MeshBuilder class.
MetaAssetList<TAsset, TMeta> A Weaver.LazyAssetList`1 that serializes a specific type of meta-data about the listed assets so that the data can be accessed and evaluated without actually loading the assets.
MetaDataUtils [Editor-Only] Various utilities for managing meta-data.
MethodBuilder [Editor-Only] Manages the details for building a method in a procedural C# script.
MiscPanel [Editor-Only, Internal] A Weaver.Editor.Window.WeaverWindowPanel containing things that don't fit in other panels.
Missile A projectile that flies straight and creates an Weaver.Examples.Explosion when it hits something or takes damage.
MissileLauncher Rotates the Weaver.Examples.MissileLauncher._Launcher to face the mouse cursor and fires a Weaver.Examples.Missile whenever the player clicks the mouse.
MissileList An Weaver.AssetList`1 of Weaver.Examples.Missile prefabs.
MissileRain Randomly spawns missiles at a gradually increasing rate over an area.
NamespaceBuilder [Editor-Only] Manages the details for building a namespace in a procedural C# script.
NavAreasPanel [Editor-Only, Internal] A Weaver.Editor.Window.ProceduralScriptPanel containing the details of the procedural NavAreas script.
NavigationAreasScriptBuilder [Editor-Only, Internal] Procedurally generates a script containing constants corresponding to the navigation areas in your project.
ObjectList An Weaver.AssetList for any UnityEngine.Object.
ObjectPool Various utilities and extension methods for Weaver.ObjectPool`1.

More detailed instructons on how to use this class and those related to it can be found at https://kybernetik.com.au/weaver/docs/misc/object-pooling.
ObjectPool<T> A collection of objects that can create new items as necessary. Get an object from the pool with Weaver.ObjectPool`1.Acquire. Return it to the pool with Weaver.ObjectPool`1.Release(`0).

The non-generic Weaver.ObjectPool class contains some useful methods of creating commonly used pools.

More detailed instructons on how to use this class and those related to it can be found at https://kybernetik.com.au/weaver/docs/misc/object-pooling.
OnInjectionCompleteAttribute An System.Attribute for static parameterless methods to have Weaver invoke them once the static dependency injection is complete.
PathMatcher [Editor-Only] A utility for finding file paths that match certain targets as closely as possible.
PoolableBehaviour<T> A UnityEngine.MonoBehaviour component which automatically detects the Weaver.ObjectPool`1 that created it so it can be released back to that pool (or simply destroyed if it wasn't created by a pool) using the Weaver.ObjectPool.TryReleaseOrDestroyGameObject``1(``0) extension method.

When inheriting from this class, T should always be the child class itself, I.E. class ChildClass : PoolableBehaviour<ChildClass>

More detailed instructons on how to use this class and those related to it can be found in the documentation.
PooledList Various utilities and extension methods for Weaver.PooledList`1.

More detailed instructons on how to use this class and those related to it can be found at https://kybernetik.com.au/weaver/docs/misc/object-pooling.
PooledList<T> A System.Collections.Generic.List`1 of active objects backed by an Weaver.ObjectPool`1 of inactive objects ready to be reused.

More detailed instructons on how to use this class and those related to it can be found at https://kybernetik.com.au/weaver/docs/misc/object-pooling.
PrefabGenerator [Editor-Only] An Weaver.Editor.Procedural.AssetGenerator which saves UnityEngine.GameObjects and UnityEngine.Components as prefabs.
PrefAttribute An Weaver.InjectionAttribute which saves and loads the value of the attributed member in UnityEngine.PlayerPrefs.
ProceduralAsset A group of details relating to an Weaver.AssetInjectionAttribute which allow its target asset to be procedurally generated.
ProceduralAssetAttribute When placed alongside any kind of Weaver.AssetInjectionAttribute, this attribute allows the injected asset to be procedurally generated.
ProceduralScriptPanel [Editor-Only, Internal] A base Weaver.Editor.Window.WeaverWindowPanel class for panels specific to a certain procedural script.
ProceduralScriptSettings [Editor-Only, Internal] Base class for settings relating to a procedural script.
PropertyBuilder [Editor-Only] Manages the details for building a property in a procedural C# script.
ReflectionUtilities A variety of utility methods relating to reflection.
ReflectionUtilities.Assemblies A variety of utility methods relating to the currently loaded assemblies and iterating through them.
ScenesPanel [Editor-Only, Internal] A Weaver.Editor.Window.ProceduralScriptPanel containing the details of the procedural Scenes script.
ScenesScriptBuilder [Editor-Only, Internal] Procedurally generates a script containing constants corresponding to the scenes in your build settings.
Score A simple scoring system with a high score and Weaver.Examples.FloatingText to indicate when points are gained.
ScriptBuilder [Editor-Only] Determines the naming conventions for a procedural C# script, as well as for #region names, #if symbols, and the messages used for obsolete members.
ScriptGenerator [Editor-Only] An Weaver.Editor.Procedural.AssetGenerator which saves UnityEditor.MonoScripts as ".cs" text files.
ScriptGenerator.AliasAttribute Replaces the method name used in the "This file was procedurally generated by ... Any modifications will be overwritten." comment at the top of a procedural script.
ShadersPanel [Editor-Only, Internal] A Weaver.Editor.Window.ProceduralScriptPanel containing the details of the procedural Shaders script.
ShadersScriptBuilder [Editor-Only, Internal] Procedurally generates a script containing constants corresponding to the properties and symbols in a set of shaders chosen in the Weaver.Editor.Window.ShadersPanel.
ShowInPanelAttribute [Editor-Only] Indicates which Weaver.Editor.Window.WeaverWindowPanel something should be shown in.
SimpleScriptBuilder [Editor-Only] A simple Weaver.Editor.Procedural.Scripting.ScriptBuilder which builds a script containing a single class.
StunOnContact When collided with, this component shows a Weaver.Examples.FloatingText to indicate that the colliding object is stunned and temporarily freezes all its UnityEngine.Rigidbody.constraints so it can't move.
Substring Encapsulates a string to treat it as a variable substring without the memory allocation and garbage collection costs of System.String.Substring(System.Int32,System.Int32).
TagsPanel [Editor-Only, Internal] A Weaver.Editor.Window.ProceduralScriptPanel containing the details of the procedural Tags script.
TagsScriptBuilder [Editor-Only, Internal] Procedurally generates a script containing constants corresponding to the properties and symbols in a set of shaders chosen in the Weaver.Editor.Window.TagsPanel.
TextGenerator [Editor-Only] An Weaver.Editor.Procedural.AssetGenerator which saves UnityEngine.TextAssets as ".txt" text files.
TextManager Provides a central location for accessing various different kinds of Weaver.Examples.FloatingText.
TextureGenerator [Editor-Only] An Weaver.Editor.Procedural.AssetGenerator which saves UnityEngine.Texture2Ds as ".png" image files.
TypeBuilder [Editor-Only] Manages the details for building a type in a procedural C# script.
UnityScripts [Editor-Only] A variety of utility methods relating to script assets in Unity.
WeaverEditorUtilities [Editor-Only] A variety of miscellaneous utility methods.
WeaverUtilities A variety of miscellaneous utility methods.
WeaverUtilities.CollectionPool<TCollection, TElement> Maintains a pool of System.Collections.Generic.ICollection`1 so they can be reused without garbage collection.
WeaverWindowPanel [Editor-Only] A collapsible panel in the Weaver.Editor.Window.WeaverWindow.

Delegate Types

Delegate Summary
AppendFunction [Editor-Only] A delegate which appends some text at the specified `indent` level.
AssetPostprocessor.PostprocessorMethod A delegate corresponding to Weaver.Editor.AssetPostprocessor.OnPostprocessAllAssets(System.String[],System.String[],System.String[],System.String[]).
FieldBuilder.AppendInitializerMethod A delegate used to append the initializer for a field.

Enum Types

Enum Summary
AccessModifiers [Editor-Only] The C# access modifiers of a member.
CSharp.NameVerbosity Specifies how detailed the name returned by Weaver.CSharp.GetNameCS(System.Type,Weaver.CSharp.NameVerbosity) should be.
MeshBuilder.MeshChannel Flags for each of the optional channels a UnityEngine.Mesh can contain.
OptionalBool A trinary logic value: true, false, or unspecified.
ParameterModifier A keyword that can go before a method parameter.
PrefAttribute.PrefType [Editor-Only] Denotes the way a particular pref will be saved and loaded.
TextManager.DamageType In many games, damage types target different kinds of armour or have additional effects, but for this example the damage type just determines which kind of text is used to show the damage number.

Interface Types

Interface Summary
IAssetList<T> A strongly typed asset list.
IDealDamage An object that can deal damage and be notified when it does so.
IDependant<T> Indicates that a type can depend on other objects. Used for topological sorting.
IElementBuilderGroup [Editor-Only] A manager for a list of Weaver.Editor.Procedural.Scripting.ElementBuilders.
IMetaDataProvider<T> An object that can specify its own meta-data.
IOnCreate Exposes a method to be called when a new instance is created by Weaver.WeaverUtilities.EnsureExists``1(``0@).
IPoolable An object with a callback method for when it is released to an Weaver.ObjectPool`1.
IReferenceIndex An object that references a particular index in another list.
ITakeDamage An object that can be damaged.

Struct Types

Struct Summary
ItemMetaData Details about an Weaver.Examples.Item.
ParameterBuilder [Editor-Only] The details of a procedural method parameter.
TypeName [Editor-Only] The name of a type.