AndyGFX Posted January 31 Posted January 31 [1] When you have one camera in scene then is possible rename camera in inspector. But when you add second camera to scene and name is changed on second camera too, from this moment you can't rename any cameras in inspector. EDIT: Try delete first chars from entity name and pres ENTER => name is not changed, but when you add char at end, then name is changed. Looks like name is change only if char is added, but not when is any deleted. [2] When you have i.e. 2 cameras in scene, then first added camera is MAIN (it's OK), but when this camera is set to hidden in inspector, then second added camera is not automaticaly activated for projection after run map. I tried this fix in script but ... local entities = game.world:GetEntities() for n = 1, #entities do print(entities[n].name) if entities[n].name == "DebugCamera" then print("DEBUG camera exist ...") entities[n]:SetProjectionMode(PROJECTION_PERSPECTIVE) end if entities[n].name == "Camera" then print("MAIN camera exist ...") entities[n]:SetProjectionMode(PROJECTION_NONE) end end ... vhere n is ID to second camera, script crash with error attempt to call a nil value (method 'SetProjectionMode') 1 Quote "... programmig is art ..."
Josh Posted Thursday at 10:31 PM Posted Thursday at 10:31 PM This is one mistake: entities[n]:SetProjectionMode(PROJECTION_PERSPECTIVE) The entity should be cast to a camera before calling camera commands: local camera = Camera(entities[n]) camera:SetProjectionMode(PROJECTION_PERSPECTIVE) Quote Let's build cool stuff and have fun.
Josh Posted Thursday at 10:34 PM Posted Thursday at 10:34 PM On 1/31/2026 at 1:09 AM, AndyGFX said: When you have one camera in scene then is possible rename camera in inspector. But when you add second camera to scene and name is changed on second camera too, from this moment you can't rename any cameras in inspector. EDIT: Try delete first chars from entity name and pres ENTER => name is not changed, but when you add char at end, then name is changed. Looks like name is change only if char is added, but not when is any deleted. I don't seem to have any problems renaming cameras in the editor. Is it possible to post a video showing the steps I should take to make an error occur? Quote Let's build cool stuff and have fun.
AndyGFX Posted 20 hours ago Author Posted 20 hours ago Yes works but only if you use [Backspace] key. Try it delete selected text with key [DEL] then is deleted text only in textfield name and when you press [ENTER], name of entity is not changed to current text in textfierld name. Quote "... programmig is art ..."
Josh Posted 18 hours ago Posted 18 hours ago Ah, okay. So when you hit enter after delete, no change in the text is detected... 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.