I would like to know if in Unity it is possible to load a new geometry in the scene once a button has been clicked. Something that opens a FileDialog, allows selecting a geometry, you click ok and the geometry is in.
My second question is: if unity hasn’t the feature mention before, I can do it with Javascript in a webpage, but then, can I have the access to the features in unity from the web page using the HTML DOM or/and Ajax?
if (GUI.Button (Rect (20,95,80,20), "Create"))
{
Instantiate(somePrefab,
position ,
rotation);
}
This is a basic creation. You can further improve it by popping a submenu in which you can choose prefab ( geometry ), location, rotation and whatever else you need.
Hey Thank you so much.
But where you say “somePrefab” can I also pass a path to some pre-save prefab? if I load load a multiple prefabs in the same scene without having the scene reset to an empty one first?