Scene duplication problems (quite serious)

Hopscotch has a very unreliable scene duplication system.
When you duplicate a scene, each and every single object in the duplicate gets renamed, BUT — if you were to reference an object in a script (i.e. Object A X Position) the reference would not get updated, therefore you would be trying to get an attribute for an object that does not exist on this scene.

If you do not understand, whenever you duplicate a scene, all objects in the copy get renamed:

i.e. Object A becomes Object A 2

BUT if you were to reference Object A in a script in the original scene, it would still point at Object A in the copy, not Object A 2 like it should.

I have two solutions:

  • Do not rename the objects (I consider this a good idea because having everything have a 2 at the end may look unsatisfactory).
  • Update the references too.

Hopscotch Team, please bring your attention to this since this bug has enough power to slow down development by a lot.

Thanks for reading!

6 Likes

that makes sense, I encounter this bug a lot.

4 Likes

@no Ping zddxxddx Sorry for thé ping :grimacing::grimacing::grimacing::grimacing: but do you know a way to get this bug under THT’s watch? Or is it just email? Thanks!

4 Likes

yes, email would be the most efficient option. if you want more information, contact @/yuanyuan or @/t1. but I recommend email. try to avoid tagging leaders - especially all of them, because most of them don’t have control over bugs.

4 Likes

Thanks! Bjvjnnkdkmd

4 Likes

This wouldn’t work because all of objects’ names in the project must be unique to each other (that’s even if they’re in different scenes).

Deleted objects also count (which means you cannot use the name “Text” even if you deleted the object with the name “Text”, which might be another bug).

5 Likes

this is very very very annoying to have, and hard to detect as well. I’ve ditched several projects because of this.

my solution is to not use scenes at all. maybe for some big projects and especially if you can disguise the blocky transition.

I prefer to use these

3 Likes

that’s true, a reliable solution for this would be hard to find. in my opinion, THT should just redesign the duplication feature altogether

3 Likes

But can’t it just have an ID for each object and rely on those? Like in Roblox: you can name everything the same way if you want to, and it won’t stop you, since an Instance.Name is not a unique identifier.

3 Likes

that would make way more sense.

@Yuanyuan ^^

3 Likes

Nope, because that would make it hard to know which one to use for reference (unless one is a square object and the other a blank text object).

And showing the ID won’t work either because it’s too hard and inconvenient to memorize the IDs of each object.

4 Likes

yes, but how other way is there? it seems ID would be most efficient, unless someone can come up with something else. the numerical method with duplication is less efficient and troublesome, but the next best choice.

3 Likes

What do you mean?
It could for like this:
When a scene is duplicated, load the copy
Afterwards, create a table with old IDs as the keys, and the new IDs as the values.
Then, go through each and every single instance of an ID type value in the project and replace the old IDs with the new ones using the table.

3 Likes

The solution is quite obvious, just don’t duplicate the scene.

Besides, why do you even need exact copies of scenes anyways?

5 Likes

It is for a project :moyai::moyai::moyai::moyai::moyai::moyai:

3 Likes

lol, maybe for YOU WIN and YOU LOSE, that show the same data besides the message.

my overall solution is to not use scenes, using variables to represent scenes or transitions are smoother, more satisfying and more efficient.
but more difficult.

3 Likes

Then why were scenes added? To make coding easier. There is a reason why I would like to use scenes, and issues which interfere with coding or creativity, or issues that slow coding down should be dealt with if they look like a bug and it would not hurt any principles if THT were to fix it.

3 Likes

That’s right, more difficult.
This is why I want to use scenes.
I have a project where having scenes work as intended is important, and besides, what would it hurt if Hopscotch used an ID system for objects?

3 Likes

true ig, but for more experienced coders ( not saying you aren’t one ), scenes are insignificant.

4 Likes

Maybe ¯\(ツ)

4 Likes