Creating Unity in Unity…

I was always keen on prototyping game ideas in the train/on the go but working on a surface pro with unity is extreme tedious. So i thought – how could unity for touch devices look like?

So the first thing i had to figure out was, how can i somehow write code inside the unity editor at runtime. I first thought about some LUA Integration but while researching about some frameworks there, i found miniScript

which in short, let you script inside a unity textfield, you just have to teach it all the commands you wanna include. And it looks like this:

And since i love to design stuff, I started to create the editor for it

A mayor part of a editor, is the flow of placing items. I wanted to avoid using handles like they are right now in unity since they are extreme hard to grab with your finger. so the solution is:

you drag the object around while holding down your finger, then you release your finger and can either choose to place the object by tapping somewhere on the screen or by swiping to the left/right anywhere on the screen to rotate a object, as soon as you lift your finger, the object gets placed.

I also took care of that you don’t have to swipe a 100% straight line on the screen. there are some degrees buffer up and down. you also have to move your finger some pixels first before the rotation starts. thats to avoid rotation when you don’t want it to happen.

I haven’t finished the Scaling of objects yet but i really don’t like the usual pinch zoom stuff somehow. i have this half circle there on the floor, maybe use this as slider.. i am not sure yet

next thing on the list is coding. I personally hate typing on a touchscreen! I hate writing whats app messages and emails. So visual scripting is the only solution. I am not a fan of node coding, its a complete different approach on reading and assembling code to how it actually should be. So I wanna go with a blox/stencyl/blockly approach.

I also learned how to code with blox and i also see this project as a education software. And the distance from block code to real code is way shorter then any node based code plugin.

i know what you wanna say “but i wanna script for real!” no problem. You should always be able to switch between block code and script code in realtime, on the fly.

What i also like about miniScript is, that its pretty much like c# but not uses any semicolon or bracket which makes it easier to type on a mobile keyboard. So semicolons are always represented by a new line, and you group the code by using the same amount of space per line.

 

There is even more to discover. I thought a lot about how to type numbers. I tried this spinning thing that you know from iOS when you set up your alarm and let the whole keyboard pop up just to enter 2 digits is too much.

So I came up with the calculator layout. One of the coolest things about unity is, that you can calculate in a textfield and I wanted that to.

In the end you should be able to use every unity component in the editor. I also redesign some of the unity icons. Still wanted to keep the original icons but with some nicer colors and more flat with less details

some people like a dark ui, some a light one – so you can choose between them however you like

the block editor should also assist you while coding. So we need autocomplete also there. Just like you know it from your IDE

there are several more Ideas I have, for example would it be nice to convert your blocks to C# code or even go a step further and export the whole project as .unitypackage and continue working on your prototype in the “real” unity

   

and when everything comes together, it looks like this:

HD Version:

 

4 Comments

  1. Alex Von Tolmacsy

    this is some of the slickest stuff I’ve seen in a long time.. as a surface pro user, I can’t help but be excited by this.

  2. NICOLAS CHICUNQUE

    Fantastic !!!

    Shut up and take my money, hehehe.

    And the inspector asignations?
    I use them every day, thanks for response

  3. Brian Jennings

    Love this! Is there a way I can help out? (e.g. a GitHub project I can branch or anything)? I’ve wanted to do this very thing for creating/coding in VR.

  4. Feynman

    cool, how is the project going, does it release? wanna use it , we are doing a similar project, how you implement the block system ?

Comments are now closed for this article.