Dependencies

Referencing one asset while generating another creates a dependency. This means that whenever either one of them is generated, the other should also be generated (dependency first). For example, if you generate a procedural building prefab which includes a procedural wall prefab you will always want them to be generated together. Modifying and regenerating the wall will need to also update the building and whenever you generate the building you also want to ensure that you're using the output from the current version of the wall generation code.

Whenever you reference a procedural asset while generating another procedural asset, you should get the asset using Weaver.Procedural.ProceduralAsset.GrabDependency(generatorMethod) instead of directly using the value of the injected field. This ensures that you always get the most recently generated asset and lets Weaver know that the dependency needs to be managed.