I want to run a Unity WebGL build on a BrightSign XT1144 player. (What should be possible in theory...)
Therefore I created an absolute simplistic Unity project (using v2020.2.6f1), not much more than displaying an image, and build it for WebGL. Then I published this build to the player using BrightAuthor:connected (using a HTML 5 Widget).
When I start the player the typical Unity WebGL loading screen appears and stops at approx. 90%.
Right now the build works fine on a local server and also online, but not on the BrightSign player.
I played around with the build/player settings in Unity but the behaviour of the build didn't change. (And of course I googled my fingertips bloody, but it's hard to find any kind of valid information...)
Does anyone already have experience with a scenario like this? Any help would be appreciated! :)
Things I tried:
Enabled Development Build
Disabled Compression
Disabled Data Caching
Disabled Engine Code Stripping
Updated BrightSign OS to 8.2.72
Finally I got it working!
This post in the Unity forum got me on the right track.
With the following publishing settings, my Unity (2020.3.2) WebGL build runs on the BrightSign XT1144 player. (BrightSignOS 8.x)
For anyone else that stumbles across this, got close with asj's solution but, at least when building with Unity 2021.3.1f1 and running on a Brightsign XD1033 on OS 8.4.14, I was getting the error
It seems your browser does not support running Unity WebGL content from file:// urls. Please upload it to an http server, or try a different browser.
Looks like Unity WebGL projects won't run locally anymore. Followed Brightsign's instructions here to get started with a NodeJS server on the Brightsign to host the WebGL. Moved everything created by the Unity build (index.html, Build, TemplateData, StreamingAssets) to a client folder within the node.js-starter-project-master folder. Modified the index.js express script to
const path = require('path');
var app = express();
app.use(express.static(path.join(__dirname, '/storage/sd')));
app.use(express.static(path.join(__dirname,'./client')));
app.get('/*', function (req, res) {
res.sendFile(path.join(__dirname, './client/index.html'));
});
app.listen(9090, function() {
console.log('Example app listening on port 9090!');
});
Also had to update webpack.config.js so the client directory was copied to dist. Replaced the CopyWebpackPlugin section with
new CopyWebpackPlugin({
patterns: [{
from: './client',
to: 'client'
}]
})
From here, followed the instructions on the Brightsign GitHub to setup the NodeJS presentation. Added an HTML5 widget to the presentation with the Site Source URL at http://localhost:9090.
Under Presentation Settings>Support Content>Files I added the node-server.zip file created by webpack.
And it's still not doing what I need. Looks like it's technically working but the XD1033 isn't capable of playing my content (a relatively simple 2D game) smoothly. It will show the Unity player but has a hard time loading the game assets. But, if I access the url from a laptop connected to the Brightsign it loads just fine. A simpler game or a more powerful Brightsign might work better.
I might be able to get it working better with some optimization and tweaking but at the moment it's not worth my time and effort. I can just build for Windows and use a PC. Was just trying to use a Brightsign since we've found them easier to maintain long term. Might come back to it if I get bored and will update if I get it working better.
Related
I am having a problem using the "Tabs" component: https://material-ui.com/components/tabs/ In fact, when developing locally, the rendering of the component is fine. But pushing to the server, it looks weird (with differences in the borders on each side of the bar).
Moreover: when refreshing the page in which it has been embedded or browsing manually to this page, the whole template is broken all of a sudden!
I tried generating a build folder locally and launching the page from that build, and fell back on the same problem.
Thank you in advance for your help
From your description, I saw that your "build" is not work even in local development. That's mean it should not work on the production, of course.
The thing is, what is your actual "build" action? Depends on what library/framework you use, but basically with Material-UI, most popular problem comes from not load some CSS before using it's components.
Please read here first: https://material-ui.com/guides/server-rendering/#server-rendering
Just in case you use Gatsby, read here: https://www.gatsbyjs.org/packages/gatsby-plugin-material-ui/.
I'm using Gatsby and use this following config to fix some CSS issues.
stylesProvider: {
injectFirst: true,
}
Hope this help.
I am just beginning to look into Ember.js engines. One thing that stands out is that for every change I make in the engine code I need to re-install it into the host application. There is no live reload, rebuild or any of this.
Is there a way to smooth out this flow as it would slow down development considerably.
The trick is to set isDevelopingAddon like so in the index.js file for the addon and use NPM link to get it into the main application node_packages folder - you will then get live reload, etc-:
// Addon index.js
isDevelopingAddon: function() {
return true;
}
To add to this I found an interesting article here: Ember and Yarn Workspaces
My partner in game dev are looking at Unity. I dynamically loaded an asset using Resource.Load() and he used AssetDatabase.LoadAssetAtPath(). They both seem to work so which one should be used? Why have 2 different ways to dynamically load assets?
AssetDatabase.LoadAssetAtPath() vs Resource.Load() ...They both
seem to work so which one should be used?
None of them.
Your partner will end up with a game that he cannot build because he used AssetDatabase.LoadAssetAtPath(). The AssetDatabase.LoadAssetAtPath() function came from the UnityEditor namespace which is only used to make Editor plugins. It won't work outside the Editor and it won't even let you build your game at-all.
You using Resource.Load is fine but Resource.Load requires the use of the Resources folder which is known to cause slow down loading time of the game.
AssetBundles is the recommended way. You can put those files in the StreamingAssets folder then use the WWW or AssetBundle API to load it during run-time. You can learn more about how to use AssetBundles here
Hi I am making a game on unity with airconsole and when I try to import the airconsole controls github repo to my unity project I get a lot of javascript errors, so I can't use the controller generator and it hinders me, A LOT.
Thanks in advance, you would save my skin.
Your HTML, CSS and JavaScript files, as well as all additional resources your controller will need (images etc.), need to be in Assets/WebGLTemplates/AirConsole so Unity will not try to compile them into C# or UnityScript.
Your controller HTML file itself can be somewhere else in the project, the file within Assets/WebGLTemplates/AirConsole will be updated automatically to match it as long as it is linked in the AirConsole Object in your scene.
If you add the plugin including example scenes into an empty project, you will see a working folder structure.
Edit/Update: in case you are getting errors along the lines of The type or namespace name 'ILGenerator' could not be found (or the same but with DynamicMethod) please see details on Reddit or StackOverflow.
Essentially: you have to set API Compatibility level o 4.x in your Player Settings for your selected platform.
I am developing an android app where I have to train my app to recognize two images and four objects.I created one single database where I added all the images and objects target in vuforia developer site and created the unity package. Now neither image nor object is getting recognized.
Probably the problem is the same for objects and images.
I think you should share some more info about what your doing as well as some meaningful code implementing it.
W/O that, I would suggest:
verify that the database and trackables are loaded and active # runtime
if so, see in console that the trackables are tracked by Vuforia
if so, verify the code enabling your augmentations
Please confirm whether have run trough these steps already and what results you got. I can share some code and further tips once the issue is a little but more specific.
Regards