Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Captivate run an embedded unity game

New Here ,
Mar 17, 2017 Mar 17, 2017

Does anyone know if there is a way to have a running unity build working in captivate. Basically we want to have it when someone goes to its slide, the game is already running in the slide. I know I can export unity to an webgl and have captivate open a webpage with unity running but we are wanting it to run in captivate itself. Any ideas or help would be greatly appreciated.

4.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Mar 18, 2017 Mar 18, 2017

So,  Captivate has the ability to embed an IFRAME into the middle of a page - it is really simple.    There is a Icon called "Object" on the toolbar, with the last element being "Web" 

You have the choice of pulling up a web page by the URL or you can specify all the iframe parameters by using the "embed code" option.    The Embed code option is pretty interesting - you can put any HTML code you want in there..  

a typical HTML iframe spec looks like: <iframe width="854" height="800" src="//www.yo

...
Translate
Community Expert ,
Mar 18, 2017 Mar 18, 2017

You should try to reach out to EJ Leblanc (https://twitter.com/ejleblanc). My guess is that if there is one person who can address your question, it would be EJ.

Paul Wilson, CTDP
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 20, 2017 Mar 20, 2017

Thank you, I think I will reach out to him. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 18, 2017 Mar 18, 2017

So,  Captivate has the ability to embed an IFRAME into the middle of a page - it is really simple.    There is a Icon called "Object" on the toolbar, with the last element being "Web" 

You have the choice of pulling up a web page by the URL or you can specify all the iframe parameters by using the "embed code" option.    The Embed code option is pretty interesting - you can put any HTML code you want in there..  

a typical HTML iframe spec looks like: <iframe width="854" height="800" src="//www.youtube.com/embed/o_znYZ7Ry-0" frameborder="0" allowfullscreen></iframe>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 20, 2017 Mar 20, 2017

That may be an option and is definitely one worth exploring especially if it opens it within the captivate slide itself.  Thank you for the information.  I am going to give it a go and let you know how it goes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 30, 2017 Mar 30, 2017

I am also interested in this, did you get it to work?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 03, 2017 Apr 03, 2017

Hi All!

I got it to work and it works like a charm when you embed a link in captivate, however I would like to natively integrate the html files in captivate instead of providing a url link on the web object, can we embed the files in captivate. the motto is that there is no dependency on the internet connection. Rest all is working fine.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 04, 2017 Apr 04, 2017

Yes, there are a few different ways to do embedding, however I think there may be a distinction between what you are talking about with respect to "no dependency on an Internet connection"  

If the unity files are placed in a directory below the course index file, you can use relative url address information to access it even if it is embedded as an iframe.  This approach does not require a webserver.  The downside is that you need to push the unity files back into the module every time you update the module.   

A relative url simply uses directory/filenames rather than http:// 

I typically set up a monitor routine that watches for when the captivate module has been updated, then I post process to add in extra files and directories as needed.   

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 07, 2017 Jun 07, 2017

Hello,

I would like to continue with exploring possibilities to use the unity games as learning objects.

My question is:

After we embed the unity game inside captivate, is there any possibility to combine the game score with the SCORM output data? Other words, can Captivate use the output data from the unity game to set the user status of the entire SCORM object?

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 07, 2017 Jun 07, 2017

assuming that the embedded unity game is being served by the same web server so that the iframe meets the security requirements,  it is possible to pass javascript variables up from the iframe to the parent frame.  if you have the ability to create custom javascript from within the unity game frame,  you can simply set a result variable in the parent iframe.  captivate can read this variable and use it.   pushing it into a "total" score that is reported through SCORM through captivate can be done either by creating a invisible quiz object that you set the value of and then activate,  or report directly in SCORM.   I've done the former, I've seen posts on the latter.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 07, 2017 Jun 07, 2017

Thanks for a quick answer and very useful answer.

I will continue with analyzing the possibility to export appropriate javascript data from the unity game to the parent frame. After that, I will come back with new possible questions.

Thanks again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 01, 2018 Feb 01, 2018

Steve:

Hi.  I'm coming into this thread 6 months on, but very much interested in the same problem of Captivate/Unity integration.  So is EJ, with whom I've been in contact, but he seems to be somewhat skeptical about your IFrame/javascript solution, maybe just because of limitations that you're well aware of.  Indeed right now he's asking me to help him explore xAPI as a possible mediation route.  Have you looked into this at all?  From what I can tell, Unity can certainly both read from and write to an xAPI source like an LRS, and obviously Captivate can publish results TO an LRS; but can a running Captivate session read from an xAPI source?  I'm far more familiar with the Unity than the Captivate side myself, so I'm just casting about for answers.  Meanwhile, I would love it if you could see your way clear to sharing an example project of the kind you discuss here--I mean Unity and Cp project code, not just the output result.  I believe you that it works, at least under controlled circumstances, I'd just love to see the details.

Matt 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 24, 2018 Feb 24, 2018
LATEST

regrets for not seeing this question until now.

Having done a complete system implementation of an xapi installation, I cannot see how xAPI helps you in this case.   In fact, I believe it will seriously distract you.  

as these kinds of configurations are pretty specific to the application need,  I'd have to look at the exact problem to provide potential options. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 28, 2017 Jun 28, 2017

Sir...can you tell me how you made this work?  I'm trying to do the same thing (gov't employee, no competition with you) and would appreciate some specifics on how you made this work.

Jay

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 22, 2017 Jun 22, 2017

I was very excited to find this discussion string this morning as I'm trying to do this exact same thing...put a Unity game inside a Captivate course.   I'm very new to writing code, so I'd very much appreciate it if someone could give me some more detail as to how you made this happen (e.g. how you output the Unity project, exactly where within the Captivate files do the Unity files need to go, what do you enter into the "embed code" in the web object, etc.).  

As always, I appreciate the help.

Jay

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 28, 2017 Jun 28, 2017

the specific solution is a function of the environment you are running in.  in some cases, people have separate servers for the unity games.  in others,  they want the game to be "part" of the course files themselves.   this impacts how the URL is encoded and the level of interaction between the unity course and the captivate module.   at a minimum,  if the course is being served as http://domain/module    and the unity  course is at   http://another_domain/unity.html  then you just use " http://another_domain/unity.html "  as the URL in the web object.    

regards

Steven Warwick

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 28, 2017 Jun 28, 2017

Steve,

I need the game to be "part" of the course files...we need server space for stuff like this, but we aren't there yet.

As I understand it, I'd need to run the game through a Captivate WebObject (i.e. an iFrame), but I don't know where to point it or where to put the files needed to run the game.

Jay

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 29, 2017 Jun 29, 2017

ok,  so the way you do this is to:

1) "publish" the captivate module but NOT as a zip file.  

2) go to the directory where the published course is.  ( there will be an index.html file there and a bunch of other directories. )  

3) create a new directory ("unity" ) at that location.  drop your unity files into that directory 

4) your web object html link will look something like "./unity/index.html" or whatever file unity starts out with.  note the dot slash at the beginning.  you shouldn't need to specify the IFRAME,  just this as a "relative" URL   the HTTP://  should not be needed.

the course can now can be zipped and shipped as a single unit.

the REAL PROBLEM with this approach is that anytime you re-publish the course,  the unity files will be deleted.  As a developer,  I typically set up a "watch" system that notices when the module has been republished and backfills all of the stuff that got erased.  this is a very fragile approach since any new developer working with the course will not know this and will likely forget to backfill the needed files.   

Frankly, One of my pet peeves with captivate is the lack of an ability for me to specify such module-related files or directories and include them automatically upon publish.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 29, 2017 Jun 29, 2017

Steve...I can't thank you enough for the help.  I'm going to give this a try and see what happens.  

I can see your concern about needing to backfill.  Our office is small enough at the moment that this shouldn't be a problem (anything I build I eventually end up updating as well), but I will keep it in mind for when we eventually grow.

Thanks again...I appreciate the help.

Jay

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 20, 2017 Jul 20, 2017

Hey Steve...I'm coming back to the well for some more information if you don't mind.

Have you had an issue with any specific browser when running an embedded course?  I'm stuck for the moment with delivering the course over IE 11 (Fed gov't; don't ask).  It looks like my Unity file tried to run, but I received an error message from within the course saying:   Please note that your browser is not currently supported for this Unity WebGL content.   I selected the "OK" option, and then got another error message from webpage:  An error occurred running the Unity content on this page.  See your browser JavaScript console for more Info.  The error was Object doesn't support property or method "log?"  The relative portion of the console log (I think) is below.

Any help you, or anyone else, can give would be greatly appreciated.

 

JayunityAccessDenial

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 20, 2017 Jul 20, 2017

this is not about captivate,  it is about Unity.   it's just not compatible with IE11:

https://docs.unity3d.com/Manual/webgl-browsercompatibility.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 20, 2017 Jul 20, 2017

Thanks Steve...this is what I was afraid of.  Time to go to the IT folks and tell them to catch up with the times!

Jay

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources