How do I script a scene

Hello. I am fairly new to scripting in Unity and need some help.

I want to create a in-game level editor and need to know how to script scenes in Unity. I have looked at the Scripting Reference, but that only shows the functions, not how to do so and how to do it correctly. I have not been able to find anything on how to do it. If anybody can give me references or advice on how to do it, I would be grateful. Thank You.

Creating an in game editor is a lot more complex than something you should start with. You make scripts to perform specific tasks, not a single script to control an entire level. The functions are what you will use in the scripts to perform the specific tasks you want to. For example, if you want to create a GUI box labeled “box” in the upper left hand corner and have it be have the screens height and width then you would do the following:

function OnGUI()
{
     GUI.Box(Rect(0,0,Screen.width/2,Screen.height/2),"box");
}

u need to understand …Unity UI First

watch tutorial videos for that.

u can search on youtube you will find tons of video they will teach u how to use unity and scripts.

have nice day

I would start off learning C# and the .Net framework and get used to the syntax and language, then learn/study the Unity API to know how to do what and what you can do with unity, then you will be prepared to script. You can apply a script to a object by dragging it into the object. Then what you use on the script will apply to the object.

Yeah, Bad Question, this is the wrong way to approach this problem.