Save Bug? (SOLVED)

I am working on a game that controles the camera thru a camera script. Recently I changed it so it would follow the player but when the player got to an edge just stop moving so you can see the border without seeing it.

local border = {220, 30, -1500, -750}
if pos.x > border[1] then
	pos.x = border[1]
end 
if pos.x < border[3] then
	pos.x = border[3]
end
if pos.y > border[2] then
	pos.y = border[2]
end
if pos.y < border[4] then
	pos.y = border[4]
end 

A simple script in the camera script. I saved everything (So I though) and moved on with my day.
But today when I decided to add some more features I relized that the scrip I added was gone.

I tried to add it again and save but it dident show up on the “Changed files” list. I reloded and updated everythig but everytime I reloded the editor (editor 2) it disappeared. (This dident happend to any other file I changed)

Before:


Added text:

Saved, but nofing showed up in the changed files…

After reloding:

Plz help, I dont know what I did or how to fix it.

Where in the project do you store the script? I don’t see it in your asset browser.

print(msg.url())

DEBUG:SCRIPT: url: [(null):]

It looks like “camera.script” sits inside a library (ludobits) that you have added to your project.

Libraries are read only. You cannot add to, or modify library files. I’ll check if Editor 2 behaves wrong here without giving warning.

If I create I separate script will it fix it?

Yes, copy the file into your project and edit it. The ludobits “camera.script” file lives inside a library zip file. Editor 2 does not (yet) warn if you try to edit such a file.

Created a separate gameobject and added the script there. Works :slight_smile:

2 Likes