yurembo Posted 23 hours ago Posted 23 hours ago How to get an object (which was made in the editor) from the scene to control it programmatically (from a script)? Quote
Josh Posted 19 hours ago Posted 19 hours ago https://www.leadwerks.com/learn/Scene_GetEntity 1 Quote Let's build cool stuff and have fun.
yurembo Posted 4 hours ago Author Posted 4 hours ago @Josh Unfortunately, the documentation for the Scene class is very short. There's only one example for the LoadScene method. When running, it produces an error: This example shows how to create a Scene object in code, but the question remains: how to retrieve it from a map file, which was created in the editor? Scene:GetEntity is described well. Is the UUID always unique? Does it never change? How is it generated? Is it some kind of COM identifier? Quote
yurembo Posted 2 hours ago Author Posted 2 hours ago this transformation does not work: mesh = NavMesh(nav_mesh)-- nav_mesh is Entity, but NavMesh s = type(mesh)-- s = nil Quote
Josh Posted 2 hours ago Posted 2 hours ago Navmeshes are stored in the scene. See the Monster script for an example. Quote Let's build cool stuff and have fun.
yurembo Posted 1 hour ago Author Posted 1 hour ago OK, I'll consider this file. How can I get a map from the file? While I'm reading the source code I see that Map and Scene are the same. Quote
Josh Posted 1 hour ago Posted 1 hour ago The scene object is passed in the script Load function. You can get the navmesh there. 1 Quote Let's build cool stuff and have fun.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.