Class DynamicEffectInstance
Represents an instance of an Effect that can be dynamically compiled in different permutations according to the permutation parameters set in its Parameters.
public class DynamicEffectInstance : EffectInstance, IDisposable, IReferencable
- Inheritance
-
objectDynamicEffectInstance
- Implements
- Inherited Members
- Extension Methods
Constructors
DynamicEffectInstance(string, ParameterCollection?)
Initializes a new instance of the DynamicEffectInstance class with the specified effect name and parameters.
public DynamicEffectInstance(string effectName, ParameterCollection? parameters = null)
Parameters
effectNamestringThe name of the Effect.
parametersParameterCollection
Properties
EffectCompilerParameters
Gets the parameters used when compiling the Effect used by this instance.
public ref EffectCompilerParameters EffectCompilerParameters { get; }
Property Value
EffectName
Gets or sets the name of the Effect to be used by this instance.
public string EffectName { get; set; }
Property Value
Methods
ChooseEffect()
Selects and compiles the appropriate Effect based on the current parameters.
protected override void ChooseEffect()
Remarks
This method updates the Effect by recompiling and reloading it with the current set of permutation parameters.
Initialize(IServiceRegistry)
Initializes the Effect instance.
public void Initialize(IServiceRegistry services)
Parameters
servicesIServiceRegistryThe service registry used to obtain necessary services for initialization.
Remarks
This method retrieves the EffectSystem service from the provided service registry.
Exceptions
- ArgumentNullException
servicesis null.- ServiceNotFoundException
The required service EffectSystem was not found.