Description
The Create
method is a static method of the ResourceGenerator
class within the Sandbox.Resources
namespace. It is used to create a new instance of a ResourceGenerator
for a specified type T
using a given generator name. This method is particularly useful when you need to generate resources dynamically based on a string identifier.
Usage
To use the Create
method, you need to provide a string parameter generatorName
which specifies the name of the generator you wish to create. The method returns an instance of ResourceGenerator<T>
, where T
is the type of resource you are generating.
Example
// Example of using the Create method
var myResourceGenerator = ResourceGenerator<MyResourceType>.Create("MyGeneratorName");
// Use the generated resource
var resource = myResourceGenerator.Generate();