In particular, we’ve been relying on Unity’s “Application.version” to show our internal staff what build they’re playing, and are curious if we’ll be able to continue doing so, or if we’ll need to develop some new way to version our builds. Is Needle exporting that data anywhere into its builds?
Hello there – we have an experimental AI bot that might be able to help you with your question. Would you like to try this out?
How it works:
Reply to the messages of the bot that end with a thread_id to interact with it and ask follow-up questions. You can also mention the bot directly in this channel to get help.
SJkl, in Needle Engine, version information can be included within the package.json of your web project. Similar to a Node.js project, you can define a version number in the package.json which can be used by your internal staff to identify the build they’re playing. Here is an example where the version is set:
"version": "1.0.0"
This version number is specified in your project’s package.json file. You can update this value for new builds to keep track of different versions (see the documentation).
1 messages leftGPT 4 thread_MFQGf4VXk1MJJHQ4gmE0Gpmy Thanks for your feedback!
and also, that doesn’t quite answer the original question of whether or not any of the Unity ProjectSettings values are exported… seems like the answer is “no”?
hmm… it looks like import { version } from '../../package.json'; works well enough for dev builds, but I imagine it’s not the best idea to just keep that around on Production webservers
One quick way to include this info would be by making a component with a public property getter that just returns the version number. Make sure to have a matching typescript component of course.
You could ensure this component is present in any scene by adding it automatically through the Needle Engine Core Builder static events (using BuildStarted for example)
Let me know if that would be sufficient already.
You could achieve the same thing without a component by using a vite plugin and defines but it involves a bit more extra work that might not be necessary