javascript error airconsole generator and unity - unity3d

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.

Related

Xcode 14: Custom templates don't appear in Swift Package file creation

I'm in a bit of a pickle. I created custom files templates for my Xcode projects.
In a normal project environment my custom templates appear when I access the New file creation popover as you can see in the following screenshoot
These templates are located at the common path of: /Users/XXXX/Library/Developer/Xcode/Templates
The problem appear when I'm working on a swift package.
When I try to create a new file the popover interface is very different and does not contain my custom templates as seen with in the following image:
My suspicion is that I should set my templates in an other specific location for swift packages but I don't know where. I have looked around and I don't seems to find any reference to where I should set custom content for Swift Packages.
I'm looking for any tips on that matter. Or any information that could give me a some clues on how to fix my issue.
Thank you in advance.

Material UI Tabs not rendering properly on server

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.

Unity3D AssetDatabase.LoadAssetAtPath() vs Resource.Load()

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

Can both image target and object target be added one single database in unity vuforia?

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

WinJS.UI Metro Animation Library

I'm starting to port over my web app that I've built with Sencha Touch into the Windows 8 world. I'm seeing a lot of WinJS.UI documentation, basically telling me that there are more 'native' feeling animations and UI actions already build into this framework.
My app is already structured, but I'd like to mix in WinJS.UI if I can. How do I go about doing this? I haven't found a link to download the library or anything of the sort.
For example, this link:
http://blogs.msdn.com/b/windowsappdev/archive/2012/05/01/fast-and-fluid-animations-in-your-metro-style-app.aspx
I see that they are using:
<script>
function runAnimation(){
enterPage = WinJS.UI.Animation.enterPage(input);
}
</script>
But I find no documentation on where to include the library.
Little bit lost, any help is appreciated!
These animations are included in the UI.Js from the WinJS Package -- this is the same WinJS that is included in the default Visual Studio Templates. Just create a new HTML Windows Store application, and the details will be there.
Here's your library: http://code.msdn.microsoft.com/windowsapps/Using-the-Animation-787f3720
You can deploy this on your computer and play with the animations.