Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Basic Unity integration

  • Loading branch information...
commit beb50eca8c3f8433bdbf0874e753937cec9fa1a9 1 parent 93bdcf2
@marcoceppi marcoceppi authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 assets/js/client.js
View
14 assets/js/client.js
@@ -18,10 +18,24 @@ window.irc = {
loggedIn: false
};
+window.unity = {
+ api: external.getUnityObject(1.0),
+ connected: false
+};
+
$(function() {
// window.app = new ChatApplicationRouter;
irc.appView = new ChatApplicationView();
+
+ window.unity.init({
+ name: "Subay IRC",
+ iconUrl: window.location.protocol+"//"+window.location.host+"/assets/images/subway.png",
+ onInit: function() {
+ window.unity.connected = true;
+ }
+ });
+
// EVENTS //
// **TODO**: is there a better place for this to go?
Please sign in to comment.
Something went wrong with that request. Please try again.