You can use the message queue if you want to pass lots of data back to DBPro:
Say you have this Lua function:
function makeobj(size,pos)
-- Send data to DBPro
SendMessage("MakeObject")
SendMessageF("Size",size)
SendMessageF("Pos",pos)
end
and, in DBPro each game loop:
while lua next()
desc$ = lua message desc()
if desc$ = "MakeObject"
lua next()
size# = lua message float()
pos# = lua message float()
endif
endwhile
While that gives a slight delay in the creation of the object, it shouldn't matter too much as its generally recommended to leave the 3d stuff to DBPro, and the logic to Lua.
If you want you could also do some nice multithreading meaning that as far as your script is concerned the object is created straight away. I've seen some fantastic scripts running with multithreading on Unity doing wonderful stuff. Can't say what though I'm afraid
And the next version of Unity will hopefully have dbpro function calling.