I have a task that I am supposed to create a web based client that allows users to create objects (in my case, furniture) and move them around and so on.
For this, I have created a button. When the button is pressed, I want to create an object, for example, a chair. For educational purposes, a cube works equally well.
The code I have to accomplish this is as following:
function OnGUI() {
if(GUI.Button(Rect(Screen.width - 170, Screen.height - Screen.height * 0.98,150,30), string)){
GUI.Button(Rect(50,50,150,30), "test");
}
}
Here, I tried to create a new button, but the goal is to create an object of some sort.
I do not know how to proceed, and I have very little experience in Javascript.
Regards