Unity SCORM Suspend_Data issue - unity3d

I am working on a serious game project on Unity for a client that must be playable on a browser and compatible with SCORM.
I discovered the concept of SCORM and LMS with this project.
I made an internal backup system, with a JSON file, which works very well when I build for PC, my score saves well and when I restart my project, I can load my backup.
Unfortunately when I build in WebGL and publish to the SCORM Cloud website, the save and load information doesn't pass.
I found on the internet that I should use suspend_data functions, I did find the description of its functions, but I can't find how to send or retrieve my score.
I must have a problem in the conversion of JSON in string.
Can you help me with this, or give me a hint.
I thank you in advance.
Sincerely

There might be a couple different issues at play here.
First off, I'm not sure that SCORM Cloud allows for the Unity Player mime type today. That could be verified with a request to support#scorm.com and it may be able to be added if it isn't currently supported.
Second, how are you communicating with the SCORM API? When a SCORM course is launched in the player, there is a javascript API exposed with some basic calls you need to make. This is where you'd set completion or a score (or suspend_data if needed) and it tells the LMS what data to persist for the learner session and makes values available from previous launches if set to resume.
This won't happen automatically, so you need to handle that in your Unity package with either a wrapper, or some javascript calls to the proper context from within the package.
Hopefully all this is helpful for your understanding of SCORM. Feel free to reach out to support#scorm.com since you're using SCORM Cloud and they can help you if you need more information.
Note: I work for Rustici Software on the SCORM Cloud team and have some light Unity experience.

Related

I need some help for unity3d game bug reporting system in steam platform

I have a question about the Unity3d bug reporting process after the game build.
The game I'm currently working on is going to be released on Steam and there is no server attached.
As far as I know now, Unity's non-development builds do not generate files with records about errors and crashes.
This situation inevitably makes hard to report bugs, and I want to provide to users the accuracy and convenience of this bug reporting. I'd appreciate it if you could give me advice if you have a good idea.
So far, I've thought of two options.
In the event of a bug, a file that records the play data and bug information separately is recorded in the game folder, and the user requests this file
Use the Auto Reporting 3rd party when a bug occurs
I don't know anything about this 3rd party, so if you know anything, please introduce it.

Tin Can API for Unity3D and Android [duplicate]

I have developed a serious game(learning game) in Unity. I would like the game to be TinCan compliant. Can somebody tell me about the processes involved in making it TinCan compliant?
Tin Can compliancy doesn't really have a specific technical meaning, in so far as it can be tested objectively. Having said that, if your content tracks its experience (learning) data in a Learning Record Store (LRS), specifically a "conformant" LRS (see test suites or ask your vendor) then that content would generally be considered "Tin Can Compliant" because it is up to the LRS to enforce the requirements in the specification itself.
We (Rustici Software) have published a number of open source libraries that can be used to assist developers in communicating with an LRS in a conformant way, one or more of them can be used in a Unity application, and the list can be found at http://experienceapi.com/libraries/. There are several LRSs that are generally considered to be spec conformant, and our Cloud based product provides a free for testing LRS.
Here is a simple Unity game example sending a xAPI statement
https://github.com/HT2-Labs/unity-xapi
It is sending one xAPI statement from Start() at game initialization.
To make this example work:
git clone locally Unity example from github
add it to your local Unity hub
there will be warning about Unity old version of the example, select whatever Unity version you use and confirm version upgrade
open TinCanTest.cs in Visual Studio, change
string endpoint = "https://ORG_NAME.learninglocker.net/data/xAPI";
string user = "KEY";
string password = "SECRET";
to credentials of your LRS and try running the game.
A similar stackoverflow question.

Need to integrate Unity output to TinCan API?

I have developed a serious game(learning game) in Unity. I would like the game to be TinCan compliant. Can somebody tell me about the processes involved in making it TinCan compliant?
Tin Can compliancy doesn't really have a specific technical meaning, in so far as it can be tested objectively. Having said that, if your content tracks its experience (learning) data in a Learning Record Store (LRS), specifically a "conformant" LRS (see test suites or ask your vendor) then that content would generally be considered "Tin Can Compliant" because it is up to the LRS to enforce the requirements in the specification itself.
We (Rustici Software) have published a number of open source libraries that can be used to assist developers in communicating with an LRS in a conformant way, one or more of them can be used in a Unity application, and the list can be found at http://experienceapi.com/libraries/. There are several LRSs that are generally considered to be spec conformant, and our Cloud based product provides a free for testing LRS.
Here is a simple Unity game example sending a xAPI statement
https://github.com/HT2-Labs/unity-xapi
It is sending one xAPI statement from Start() at game initialization.
To make this example work:
git clone locally Unity example from github
add it to your local Unity hub
there will be warning about Unity old version of the example, select whatever Unity version you use and confirm version upgrade
open TinCanTest.cs in Visual Studio, change
string endpoint = "https://ORG_NAME.learninglocker.net/data/xAPI";
string user = "KEY";
string password = "SECRET";
to credentials of your LRS and try running the game.
A similar stackoverflow question.

Loading a file into a unity3d application that is embedded using webplayer

I have no experience with Unity3D so figured I would ask here.
I have an application built in Unity3D that allows the user to save a file at some point. This file can then be loaded back into the application for use later. Works fine in the iOS version of the app. However I also have the application embedded in a browser using webplayer.
When embedded I am unable to load files into the application due to, what I assume to be, security/browser restrictions.
So, is there a way to fix this, or is there a way to have a normal html form and have this allow the file to be uploaded and opened within the application?
Any help would be greatly appreciated :)
Basically, you have two good ways to solve that issue.
1) The easiest with minimal work is to use PlayerPrefs for storing player progress data. You can use it on standalone build as well, and you don't have to worry about saving any files then. On web player, there are however few limits:
WebPlayer
On Web players, PlayerPrefs are stored in binary files in the following locations:
Mac OS X: ~LibraryPreferencesUnityWebPlayerPrefs
Windows: %APPDATA%\Unity\WebPlayerPrefs
There is one preference file per Web player URL and the file size is limited to 1 megabyte. If this limit is exceeded, SetInt, SetFloat and SetString will not store the value and throw a PlayerPrefsException.
Good to remember is to make sure you encrypt your values, to prevent cheating by users.
2) Second option in WebPlayer is to use server to provide authentication and saving progress. It is quite usual for web apps, especially on commercial platforms like Facebook.
This option is more versatile, because user can play from any desktop and he will always have access to his saves, where with PlayerPrefs it would be very hard to achieve.
On WebPlayer it is very difficult to force user to save anything because of the security limits. Solutions like providing user with save-download link and then reuploading it manually seems as very bad option, and it probably would involve a server anyway.

Data syncing with DropBox API and iOS

I have an iOS app which stores data in the local directory. I'd like to be able to sync this data between multiple devices running my app. Currently this is using core data, but I'd expect to have to change to some text-based file storage system to make syncing easier.
I was expecting the DropBox API would make this nice and easy, and that I could tell the API to simply sync the contents of my data folder on startup/save. However it seems the DropBox API is nothing more than a glorified way of uploading and downloading files.
Am I wrong on this assumption? Can the DropBox API actually make it easy to keep a folder full of text files in sync? If not, is there some other service or even advice you can give? Syncing is hard - I was hoping DropBox would make it easier.
Using /metadata, getting information about the contents of a folder couldn't be easier. All you need to do is check the modified date, and if it's different than yours locally, perform the appropriate action. It will also give you the metadata for any file contents, so you can pick out which files need to be uploaded / downloaded / added / removed as necessary.
Any more functionality than this would be very application-dependent; you can decide for yourself when and how you want to deal with differing files.
Dropbox API Documentation
Won't repeat since Andy has answered your question, thought you may also find this tutorial helpful:
http://www.nanaimostudio.com/blog/2011/1/20/how-to-synchronize-your-app-data-using-dropbox-api.html
Check out the new DropBox Sync API.
As ohho mentioned, there's the DropBox Sync API available now which I think will do what you mentioned (I haven't tried it personally, as I integrated support for Dropbox in my app using the earlier SDK, before this came along). This will probably suffice if you're just working with dropbox.
In my case I've been starting to add support for additional online storage ("Cloud") services to my app, and am finding that it's somewhat challenging to deal with the differences between them in how they handle various concepts like authentication, version, naming etc. For example Dropbox's API references files according to their path, whereas Box's API references files according to their file id (which has an associated path, but I believe remains the same if the file is moved). Then there's also all the issues of conflict resolution (aka merging) which come about when multiple clients try and sync conflicting changes to the server.
I've actually been recently considering starting an open source project to develop a library which can connect to all the major services, and provide an abstraction layer that papers over their differences, and also handles the syncing process for you. I've actually got some code already (which I haven't publicly released to date) but could use that to get the project started.
Would this be of use to you? Would you (or any others) be willing to participate in such an effort?
(note to mods: I realise this may be deviating somewhat off-topic - sorry about that. If you can recommend a more suitable forum to discuss this I'd be happy to take the conversation there).
There is a RSS feed that can be limited to one of the shared folders but it kind of filters events to keep volumes low.