Search Unity

Why does my Unity to SCORM package not load Web Player properly?

Discussion in 'Editor & General Support' started by MetaLingual, Feb 28, 2013.

  1. MetaLingual

    MetaLingual

    Joined:
    Feb 28, 2013
    Posts:
    1
    Why does my Unity to SCORM package not load Web Player properly? When launched as a SCORM package via Moodle (my LMS), it asks for Web Player to be installed even though it is installed and running correctly (even in another tab)?

    You can view it here in my moodle installation:
    http://www.mindmapacademy.com/enter/

    just login as Guest, and it's the first package in the only course.

    I have already tried uninstalling and reinstalling web player.

    You can download the zip of the scorm package itself including manifest at http://www.mindatlas.me/testbypc.zip

    Any help available would be greatly appreciated. Thank you
     
  2. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
    How did you wrap it?

    Are you using ADL's SCORM wrapper? Unity per say is not SCORMified by default so if your LMS does anything to the player files / paths then its an issue with the LMS not with Unity and you'll have to ask Moodle.
     
  3. snow999

    snow999

    Joined:
    Mar 6, 2013
    Posts:
    1
    Hi Furaon,

    i have the same issue, i think i'ts cuz the game wants to start immediatly and is not waiting for the scorm initialize to finish up.

    In the quickstartguide its mentioned

    "6. In your game startup logic, make sure the simulation does not begin or pauses until you receive the Scorm_Initialization_Complete message. Make sure the logic that controls this is attached to a child gameobject of the ScormManager so that it will receive the message."

    I believe this is it, but i have absolutly no clue how to make a game to wait till scorm connects to moodle, and how to recieve this scorm init message and then start my game.

    ps: i have a working scorm unity game sample package.zip file from the scorm tutorial and it works fine in moodle 2.41+ windows package install. the issue must be in our source code , startup logic of our games. trying now to reverse engenier the tutorial code but its complicated for a unity beginner like me, to see where exactly the working unity project waits for the scorm init message and then start the game
     
    Last edited: Mar 6, 2013
  4. olkeencole

    olkeencole

    Joined:
    Oct 2, 2009
    Posts:
    17
    Hey guys,

    Has their been any new development on this issue? We're using Blackbooard, but we had no problems when we were using Unity 3.5. We successfully uploaded numerous SCORM modules to Blackboard then. But with Unity 4, we experience the same issue Furaon is experiencing. We think it might have something to do with the SCORM template as we have been able to load the webplayer without it on Blackboard. Any hints or tips to solving this issue would be greatly appreciated. Thanks!
     
  5. KeithT

    KeithT

    Joined:
    Nov 23, 2011
    Posts:
    83
    After a lot of pain and rewriting how our application starts, we have Unity4 working with SCORM in Moodle. How your app starts is key but the ADL package needs a complex rewrite re how multithreading is done to work with 4, so it's not for the faint hearted.

    We now have the issue we can't get Unity to talk to any other server when it is served from Moodle, Unity rejects the crossdomain file even though the identical file works if the same app version is hosted external to moodle.
     
  6. olkeencole

    olkeencole

    Joined:
    Oct 2, 2009
    Posts:
    17
    Hi KeithT,

    Good job getting it to work in Moodle. Do you know what changes happened in Unity 4 to break it? Our SCORM application is fairly simple; we don't need much. How did you go about getting the application started?
     
  7. KeithT

    KeithT

    Joined:
    Nov 23, 2011
    Posts:
    83
    Hi olkeencole,

    Sorry for the delayed post, just back from hols.

    Basically the multithreaded stuff in the package needs to be converted to co-routines cos 4 does more checking than 3.5 in this area which is why it does not work.

    Don't think it matters how big you app is, the SCORM initialisaiton stuff all needs to happen.
     
  8. Mahmoud Fayez

    Mahmoud Fayez

    Joined:
    Feb 9, 2013
    Posts:
    1
    Guys,

    make sure you web server allows .unity3d extension which is not by default. If you can download zip files from your web site then just change the extension from .unity3d to .zip and edit the html page to load this one. basically you will just rename the file and change the name in one line only in the html page.

    for more details on how to enable file extension on IIS or Apache please check those links:
    http://httpd.apache.org/docs/2.2/mod/core.html#filesmatch
    http://www.iis.net/configreference/system.webserver/security/requestfiltering/fileextensions

    this works for me
     
  9. hoChinese

    hoChinese

    Joined:
    Aug 29, 2012
    Posts:
    2
    Hi KeithT,

    It would be greatly appreciated if you could share your solution.
     
  10. NTDC-DEV

    NTDC-DEV

    Joined:
    Jul 22, 2010
    Posts:
    593
  11. KeithT

    KeithT

    Joined:
    Nov 23, 2011
    Posts:
    83
    @Polish no it's not the same, we did this independently months ago. It did not exist when we needed it. I asked ADL if they would provide any support/updates and never got a reply. Not had time to do anything with it beyond our immediate use.

    I guess if Unity are selling this as part of the serious game package thingy, then maybe they came to a deal with ADL to get it updated, which is perhaps why it has recently been posted on github. We have enough code to maintain so if someone else is doing that we will probably swap to their version if it's good, after we have checked it works.

    @hoChinese, probably makes sense to look at the github link if there is going to be a community around it.
     
  12. hoChinese

    hoChinese

    Joined:
    Aug 29, 2012
    Posts:
    2
    @KeithT @PolishRenegade

    Thanks for the help. It works.
    But now i have a situation that the comments_from_learner doesn't work for me.
    I use the AddCommentFromLearner () from ScormManager class.

    Code (csharp):
    1.  
    2. public static void AddCommentFromLearner (commentTypeComment comment)
    3.     {      
    4.         commentType newcomment = new commentType ();
    5.         newcomment.comment = comment;
    6.         newcomment.timestamp = new Scorm2004.DateTime (System.DateTime.Now);
    7.         GetLearnerRecord().comments_from_learner.Add(newcomment);  
    8.     }
    9.  
    by calling
    Code (csharp):
    1.  
    2. Scorm2004.commentTypeComment c = new Scorm2004.commentTypeComment ();
    3. c.Value = "myComment"; 
    4. ScormManager.AddCommentFromLearner (c);
    5. Commit ();
    6.  
    it only save the timestamp without the comment itself.
    I am not able to retrieve the comment since it never been store in database.
    I guess the way i assign the string to commentTypeComment is wrong

    and there is no GetCommentFromLearner function
    i tried
    Code (csharp):
    1.  
    2. List<commentType> newcommentList = GetLearnerRecord().comments_from_learner;
    3. Debug.LogError (newcommentList.Count);
    4.  
    It shows 0;

    Any idea on that?
     
    Last edited: Nov 14, 2013
  13. JeffMills

    JeffMills

    Joined:
    Feb 16, 2015
    Posts:
    1
    Resurrecting this old thread as I'm having similar issues.
    First off, the built-in template for SCORM uses some outdated script for getting the Unity player, and on my Macbook, it never believes that the Unity player is installed. I got around this by using a standard template and including the scorm.js scripts into that.
    But then when I try to run (using the included ScormSimulator.js) I am presented with a blank screen. It doesn't even show the Unity loading bar. Is there something I have to do even prior to my own code to let the SCORM initialize and launch the web player?
     
  14. LuisChicas

    LuisChicas

    Joined:
    Mar 11, 2015
    Posts:
    1
    Hi everyone. I have been working on a integration like this for 3 days in Unity 4.6, and until now I had to do these things:

    - As @JeffMills wrote, you have to select Unity Web template (not Scorm one) and then add the next line at the html file of the build:

    Code (JavaScript):
    1. <script type="text/javascript" src="./scripts/ScormSimulator.js"></script>
    2. <script type="text/javascript" src="./scripts/scorm.js"></script>
    - Make any build using Scorm Web template and copy the extra files generated by this template into your project's folder.

    - Look for the script "scorm.js" and add these lines:

    Code (JavaScript):
    1. var u = new UnityObject2();
    2. u.initPlugin(jQuery("#unityPlayer")[0], "WebPlayer.unity3d");
    Then, change every "GetUnity().SendMessage(..." you find for "u.getUnity().SendMessage(..."

    - And you have to name the build as "WebPlayer" in order to avoid a error when making the Export Scorm Package process (or comment that validation at ScormExport.cs)

    After these actions I pass several errors, but I'm still not be able to have a successful Scorm Initialization. What @KeithT said is interesting because I think I'm having issues related to threads handling, so I'm going to try to edit that and use co-routines.

    If anyone get a solution it would be nice to know it.
     
  15. ProfPivec

    ProfPivec

    Joined:
    Sep 21, 2012
    Posts:
    28
    I am also working with Scorm/Unity at present. I wasted a fair amount of time trying to get rid of Unity error messages, and Scorm to initialise, when I found replacement C# scripts on github. These update the ones in the ScormPackage (at least the one I downloaded).

    Back at the top of this thread, Keith T writes...

    "We now have the issue we can't get Unity to talk to any other server when it is served from Moodle, Unity rejects the crossdomain file even though the identical file works if the same app version is hosted external to moodle."

    I will also need to access an external server. Does anyone know if this is still a problem and if I will have issues? Any solutions if it is??

    Thanks in advance.

    Additional info about the problem...
    http://scorm.com/blog/2013/04/solving-the-scorm-cross-domain-issue/
     
  16. ProfPivec

    ProfPivec

    Joined:
    Sep 21, 2012
    Posts:
    28
    After many tests and research, SCORM will not work with the content on another server, not even just the player database. Storm does not allow cross domain access.

    However, TIN CAN does. Anyone had experience with Tincan and unity??
     
  17. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,051