Wednesday, July 27, 2022
HomeGame DevelopmentTypeError: GradientRange will not be a constructor - Cocos Creator

TypeError: GradientRange will not be a constructor – Cocos Creator


Hiya,

Does any individual is aware of why a GradientColor property works advantageous within the editor however crash at runtime with this error : “TypeError: GradientRange will not be a constructor”

    @property
    public outlineColor : GradientRange  = new GradientRange();

I do know this class is initially utilized in 3d particles, however I wish to use it in a customized element.


The Particle System was disabled within the characteristic cropping of the undertaking settings.

I not get errors, however at any time when the editor recompile the undertaking, the adjustments made to the gradient within the editor are misplaced.
It reverts again to plain white gradient.

Which model are you utilizing

3.5.0
The reset of the gradient occurred as a result of i used to be modifying it from a prefab occasion.
When edited from the prefab itself or if the occasion is unlinked from the prefab, the gradient stays persistent.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments