Pro Only: Weaver Lite allows you to try out this feature in the Unity Editor, but it will not be available in a runtime build unless you purchase Weaver Pro.
The Problem | Creating self-contained global systems which aren't part of a particular scene but still need to reference specific assets will normally result in code that is fragile, inefficient, and/or inconvenient for development. These drawbacks can be avoided by using Asset Injection. |
Using Asset Injection | How to use Weaver's Asset Injection system. |
Injection Attribute Types | There are several different kinds of injection attributes included with Weaver and you can implement your own. |
Asset Naming | During the build process a procedural script is generated and added to the start scene to execute all runtime injection efficiently. |
Read-Only Fields | You can use Asset Injection on readonly fields and properties so you won't set them accidentally in other code, but this has certain potential issues to be aware of. |
Pref Injection | You can inject the values of simple fields using the [Pref] and [EditorPref] attributes. |
Runtime Injection | During the build process a procedural script is generated and added to the start scene to execute all runtime injection efficiently. |