Add code generation for validation logic #23
Labels
Code Generation
Impacts how a component's code generation occurs
Emitter Component
changes to triggers, initializers, modifiers, etc...
enhancement
New feature or request
There are some cases where the code generated by an emitter definition may cause an exception to be thrown in some scenarios. One example of this is the
RandomParticleCountInitiailzer
, as it will callRandom.Next()
, but if the max is less than the min value an exception will be raised.While a fix is being put in to make this less likely to happen with generated code, it will still be possible for game developers to modify the properties manually in the generated class.
It would be useful for components to be able to specify logic that gets executed in a
EmitterLogic.Validate()
call, so a component can look for error conditions and throw a more helpful exception. This is also helpful to keep the number of times the validation logic has to be run to a minimu.The text was updated successfully, but these errors were encountered: