Skip to content

Commit 6c49d40

Browse files
authored
Update index.js
1 parent e27d188 commit 6c49d40

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/Workspace/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ class UnityscriptWorkspace {
3333
this.id = this.__generateID(18, "1234567890");
3434
Workspaces.push(this.id, this);
3535

36+
37+
// workspace type (2D or 3D)
38+
this.type = 0;
39+
if (settings.type) {
40+
if (typeof settings.type == "string") this.type = (settings.type.toLowerCase() == "3d") ? 0 : (settings.type.toLowerCase() == "2d") ? 1 : 0;
41+
else this.type = settings.type;
42+
}
43+
3644

3745
// instances
3846
Object.defineProperty(this, "__instances", {

0 commit comments

Comments
 (0)