Friday, September 23, 2022
HomeGame DevelopmentGet venture title at runtime in 3.x - Cocos Creator

Get venture title at runtime in 3.x – Cocos Creator

I’m searching for a property or getter that can return the venture title at runtime, however I’ve not been capable of finding one but. Does one exist and I’m simply lacking it? Or is there one other approach I can get this worth?

For instance, within the web-mobile construct template’s index.ejs the title tag is populated by way of <%= projectName %> macro. Is there a strategy to get this identical worth within the sport’s supply code throughout runtime?

I’d slightly not attempt to parse this title tag for it as a result of it’s not dependable sufficient as a consequence of totally different construct templates current and this being simply changeable.

What platform are you making an attempt to get the title of the venture beneath?

I constructed the web-mobile venture with CocosCreator 3.6.0, with the venture title within the title tag.
Currently, the CocosCreator engine doesn’t report the person’s venture title, so there is no such thing as a strategy to question it by means of the engine API. You can solely entry the title tag attribute and resolve the venture title your self.

I see, I hoped to keep away from that however I suppose it should do for now. Thank you for the response.



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments