Skip to content
Permalink
Browse files

fix instantiate

  • Loading branch information
crocuis committed Jan 11, 2016
1 parent cb28f67 commit 1769f4643d0da9c06045475e4e601f767f2440c0
Showing with 3 additions and 1 deletion.
  1. +3 −1 Plugins/UnrealJS/Content/Scripts/instantiator.js
@@ -260,6 +260,8 @@

var next_id = 0

let Outer = Root.GetEngine ? Root.GetEngine().GetEditorWorld() : GWorld

function instantiate(design,scope) {
if (!design || !design.type) {
throw 'failed to instantiate no design!'
@@ -268,7 +270,7 @@
scope = scope || function () { return {} }
var bindings = [];
var custom_bindings = [];
var instance = new design.type();
var instance = new design.type(Outer);
if (!instance) {
throw 'failed to instantiate' + design.type
}

0 comments on commit 1769f46

Please sign in to comment.
You can’t perform that action at this time.