#Editor extension basics
1 messages · Page 1 of 1 (latest)
Ah, okay so a bit of history and explanation. IMGUI was also used for doing runtime UI originally, though nowadays people use UGUI (the component and game object based system).
So the manual you are seen tells you how to use it for runtime UI, looking in the game view and you should see it.
nothing here
If you want to add UI to the SceneView then you would want to do something like this
[InitializeOnLoad] // This tells Unity to call the static constructor whenever the domain reloads
public static class SceneViewExtension
{
static SceneViewExtension()
{
SceneView.duringSceneGUI +=
}
private static void SceneGUI(Scene scene)
{
// You can't use the layout system for this so need to position it manually.
if (GUI.Button(new Rect(0, 21, 100, 21), "Press Me"))
Debug.Log("pressed");
}
}
ok so there isnt a way to without code, add the ui?
No
What is it that you are wanting to do?
trying to make a random placement generator for trees for my upcoming game
but its something id have to be able to make pretty quick
Ah
thanks anyway
There are a lot of prefab placement things
some on github and some for really cheap on the asset store
its not a game im going to invest money into
its a school project
2 weeks to make the game
this is preparation
Well, there is a couple good free ones if you want
for gui creation?
For placing prefabs
Yup
could you link me?
ok, it looks great for when you need to fill a full area
i need mine randomized though
thats what im currently working on
You need what randomized?
the placement in the area
You need to place trees randomly within an area, correct?
mhm
Hmm, I thought it could do that...
not from what i saw
yeah, seems not. My bad
no worries
already working on my own without ui
the inspector will have to suffice as ui
There is also this, not sure if it suits your needs or not
oh shit