Home Game Development Get mission identify at runtime in 3.x – Cocos Creator

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

0
Get mission identify at runtime in 3.x – Cocos Creator

[ad_1]

I’m on the lookout for a property or getter that can return the mission identify 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 method 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 approach to get this identical worth within the recreation’s supply code throughout runtime?

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

What platform are you making an attempt to get the identify of the mission beneath?

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

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

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here