Sunday, September 25, 2022
HomeGame DevelopmentGet mission title at runtime in 3.x - Cocos Creator

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


I’m in search of a property or getter that may return the mission 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 through <%= projectName %> macro. Is there a method to get this identical worth within the sport’s supply code throughout runtime?

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


What platform are you attempting to get the title of the mission underneath?

I constructed the web-mobile mission with CocosCreator 3.6.0, with the mission title within the title tag.
At the moment, the CocosCreator engine doesn’t file the person’s mission title, so there isn’t a method to question it by way of the engine API. You may solely entry the title tag attribute and resolve the mission title your self.

I see, I hoped to keep away from that however I suppose it must do for now. Thanks for the response.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments