Saturday, October 8, 2022
HomeGame DevelopmentQuestions concerning the masks part - Cocos Creator

Questions concerning the masks part – Cocos Creator

I would like to chop out numerous shapes from a texture for puzzle video games. Currently utilizing Cocos Creator 3.6.0.
Tell me, please, what sort of masks has the least affect on the efficiency of the sport engine?
Would like to make use of GRAPHICS_STENCIL. Tried the instance from Cocos Creator 3.6 User Manual->Mask Component Reference, acquired
error: “Error: [Scene] ‘’ is deprecated, please use ‘Mask.subComp’ instead.”
Visual Studio Code – Property ‘graphics’ doesn’t exist on sort ‘Mask’:

But the masks works!
Will GRAPHICS_STENCIL be supported in future variations of the engine or will there be another?
What might be finished with ‘Mask.subComp’?

I’ve used “Mask._graphics” in 2.x model, test if it nonetheless works in 3.x ?

Yes, I wrote that it really works, nevertheless it provides a warning: “Error: [Scene] ‘’ is deprecated, please use ‘Mask.subComp’ instead.” within the browser and within the Cocos Creator console, in addition to in
Visual Studio Code – “Property ‘graphics’ does not exist on type ‘Mask’”

In the engine, the masks makes use of the _graphics, you need to use it usually.

Thanks I used to be simply confused by the deprecated API warning.



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments