Try to use the Ajax style of "autocomplete" function onto Unity. The concept is work, however, the calculation of the bounds volumes of objects still need to be fine tuned.
[web-player]
http://homepage.mac.com/antonioh/unity3d/build/autocomplete/index.html
Modified from the AutoCompleter (v1.1)
http://digitarald.de/project/autocompleter/1-1/showcase/local/
The is the modified version of above...
http://homepage.mac.com/antonioh/unity3d/build/autocomplete/Autocompleter.js
(7 extra lines of code are added, commented with "for unity")
plus, here the simplified code that inside the unity. The most important thing to do is sending out all the searchable item as an array to the browser.
//-----------------------
function Start()
{
gameObject.name = "IAC_Object";
Application.ExternalCall ("auto_complete", countries);
}
function gotoTarget(name:String)
{
// move your camera to the new viewpoint...
}
function groupTarget(json:String)
{
// decode the json string...
// then move the camera to the group target that based on the volume of those gameObject.
}
private var countries = ["Afghanistan", "Åland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas"];
//-----------------------
@monjaldos please check the description on above, that is updated ;)
wish24601 1 year ago
Really cool dude, can you please explain a little bit more about how do you manage messages inside Unity? thanks
monjaldos 1 year ago