I asked this question on the Project Tango Google+ page and it was suggested that I post it here.
Something that I'm very confused on is area learning. Apparently, how it works is that you scan a room, save the ADF file, then later you can visit the same room and load the ADF file and it will know your position in the room, correct?
Does anyone have any experience doing this in Unity? There's a "Save ADF" button in the example, but no way to load it afterward? How do you use ADFs you've previously saved? It's all very confusing to me right now. Can anyone help explain things a bit better?
DEPRECATED
Your understanding and explanation about the working of Area Learning and Area Description Files is right.
There is an example called "AreaLearningUnity" in Project Tango Unity Examples repo showing the usage of this functionality.
In this example you can save the ADF by clicking the SaveADF button, and when you restart the app again, it automatically loads the last saved adf.This functionality is executed by the following code in the example.
if(m_useADF)
{
// Query the full adf list.
PoseProvider.RefreshADFList();
// loading last recorded ADF
string uuid=PoseProvider.GetLatestADFUUID().GetStringDataUUID();
m_tangoApplication.InitProviders(uuid);
}
To choose a specific UUID instead of the latest one, you can use GetCachedADFList() call which returns a list of ADFs saved on your device, which can be used to choose the ADF you want to load.
I encourage you to take a look at PoseProvider Class in Project Tango Unity SDK.
EDIT: The SDK has changed so much, so this can be marked as deprecated.
Related
We are still absolute beginner in moodle. I will try to phrase our query as clearly as possible.
So, the basic requirement for our project is that, we be able to host unity games in moodle courses and track the student performances in each of the unity games. For now we have decided to go with xAPI standard. We have already setup a free LRS from scrom cloud.
My query is : How can I (moodle side developer) send the information on who is the current user that launched the unity game. So that my game developer friend can later send the statements like : A USER clicked in the BUTTON. Or, a USER ended a game with the score of 82. And things like that.
I am finding it very hard to grasp the general idea of how this works. Any help would be highly appreciated. Just pointing in the right direction would help a lot.
To be able to use your Unity project in Moodle you will have to add it as an activity. Moodle handle different kinds of activites (SCORM, H5P...)
You can instal the following plugin which implements xAPI
https://moodle.org/plugins/mod_tincanlaunch in Moodle and look its source code to get an idea. When installed, you will find the source code in the folder:
mod/tincanlaunch/
I think the general idea is:
Get the current user info in Moodle:
global $USER
$username= $USER->username;
$firstname = $USER->firstname;
$lastname = $USER->lastname;
Post those information to Unity
Get it in Unity
Then send to LRS and/or Moodle.
Maybe you can fit your Unity project to mod_tincanlaunch if it meets your needs.
My goal is to convert a block of text that is on the screen into an image and save it to the user's gallery (or downloads folder, or anywhere on there phone that allows them access to it)
On searching through the many many threads on this subject it seems the best way is to take a screenshot with the "camera".
However, the manual tells me to use Application.CaptureScreenshot but in unity it says that is depreciated.
All i can find on searching for alternatives are paid for assets (seems dodgy for something that should be so simple) and examples of using Application.CaptureScreenshot
ScreenCapture.CaptureScreenshot is what you are looking for now.
Facebook recently announced the introduction of messenger codes which can be used to add new contacts and, more importantly, communicate directly with businesses and business pages (which is why I'm interested in it).
It took me ages to find it but on the bottom left of the messages tab on my Facebook page I have the option to download my code in three different sizes - clicking the disc will open a modal window where you can click the Download button and choose from 300, 600 or 1000px PNG file downloads.
NOTE: While they are PNG files the background is not transparent which seems like a bit of an oversight to me but hey ho that's what Photoshop is for I guess.
The problem is that while I can download my code I can't find any way to test it on printed materials (or even electronically at the moment!). The scanning feature doesn't seem to have been rolled out for me yet (I tried re-installing the Messenger app to see if I got a newer version but that didn't work) and nor for anyone I know (I'm in the UK). The codes are bespoke to Messenger so can't be scanned or tested using any other app.
I'm probably too far ahead of the game but is there any way I can test to see if my code scans correctly, or anywhere I can go to find out? I would like to use it on some promotional material which is likely to be long term materials that I don't want to have to update in the near future (several years, by which time it's likely these codes will be more commonplace).
I also need to know what the redundancy is like. For example the high redundancy QR codes I generate can have up to 30% of the code covered while still being usable, which is great for design purposes. I can't find any official documentation as yet for these codes at all, let alone what is required, what the spec. is etc.
I know the most likely option is 'sit and wait' but I really would rather not if possible. I've never been very patient...
Thanks
UPDATE: My Messenger app has now been updated so I can test, but I'm leaving this here in case anyone knows of another way to test perhaps? If someone doesn't have Messenger on their phone for example.
I have some basic questions that I couldn't figure out after searching for quite some time now. All tutorials and guides I've come across have the code already set up and I can't find them of much use. For instance, the Friend Smash example has the code integrated with buttons and other scripts that I can't use it in my own game.
I used Parse to upload my game and test it on facebook and it's working fine, but I want to add the social features to it (login, share, score etc.)
Picking up the code snippets that I'm supposed to use either brings me up errors (undefined variables etc.) or messes things up (I get the not-working, bugged login window on top of the running game inside Unity, while nothing happens if I build and run it).
Where am I supposed to put the code? For example:
https://developers.facebook.com/docs/unity/reference/current/FB.Init
In the "Example" part, where am I supposed to put this line?
FB.Init(SetInit, OnHideUnity);
Same thing here:
https://developers.facebook.com/docs/unity/reference/current/FB.Feed
If I use the "Example" code as it is I get errors.
Do I have to use specific names for the scripts?
This is my first time uploading a game and trying to add social features to it so these questions may seem simple, but I couldn't find an answer anywhere.
You should create your own class instead of "Example" class, where you put all your Facebook specific functions. Then you should invoke your methods with your own components, buttons, triggers, whatever.
It is also you, who should take care of pausing the game while running social functions (login, share etc.).
I'm currently working on an iPhone project where i want to present to the user spesific terms from wikipedia. I'm facing tow difficulties right now:
1. I want the specific content to work offline.
2. I want to show the relevant pictures as well.
I need to find the most efficient way to do it, can someone advise ?
You could get the content online and cache them in the app DB. If necessary you could prepolutate the db directly in you app. That way some terms would already be available.