i announce that i created python library to create and edit Defold game engine project in way that simulate the editor actions but without editor .
for now its alpha release , has some bugs i intend to fix soon , please let me know if any one need it .
check this library :
example :
from DefoldSdk import Project
projectpath = "path/of/defold/game/project"
game = Project(project=projectpath)
c = game.newCollection(name = "main")
go = c.addGameObject(id = "go1")
go12 = go.addGameObject(id = "go1-2")
go2 = c.addGameObject(id = "go2")
model = go2.addModel(id = "model")
model.setMaterial('model')
model.setMesh('cube')
model.setTexture('tex0' , 'logo_256')
go2.position.update({
"x" : game.gameproject.display.width * 0.5 ,
"y" : game.gameproject.display.height * 0.5
})
go2.scale3.update({
"x" : game.gameproject.display.width * 0.5 ,
"y" : game.gameproject.display.height * 0.5
})
game.update()