R178 - 'Clone' doesn't keep all of the originals properties

Bugs will be moved here once resolved.

Post » Mon Sep 22, 2014 3:24 pm

So it's caught me out a few times. I've right clicked on an object in projects panel and selected 'clone'. However the new object doesn't always share all of the originals properties as some are set to the default value.

Examples:
I cloned a sprite with the wrap behavior set to wrap to viewport. The clone has the default option of wrap to layout.
I cloned a spritefont. The clone has the default options char width and height 16, default char set, text "text", etc.

I think happens with most things that are cloned.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Fri Sep 26, 2014 7:49 am

It should work if you clone the object from within the layout view. -> Right click object: Clone object type
B
19
S
2
G
1
Posts: 23
Reputation: 1,473

Post » Fri Sep 26, 2014 8:01 am

I dont seem to have the problem with most my objects (in terms of behaviours etc) , but when I clone a 'text' objext i get the same problem, it resets all the size, color, font etc etc, and I also get the same problem as above with regards to sprite fonts
B
11
S
2
G
1
Posts: 68
Reputation: 777

Post » Fri Sep 26, 2014 11:42 am

I assume what happens is that when you clone from the project window it does not exist in a layout yet. So when you drag it into a layout the extra properties that aren't seen are added. However, those things propagate with the default value.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Fri Sep 26, 2014 2:00 pm

Closing as won't fix. You should clone objects by right-clicking objects in the layout view and choosing Clone from there; this way it knows which instance you want to clone from, and it correctly copies all properties. If you clone from the project or object bars, it doesn't create any instances, it only creates a new object type. Since there are no instances then there is nowhere to copy any properties to, and it's also ambiguous where to copy properties from, since you clicked an object type and not a specific instance, and the object type could have all sorts of instances with different properties. When you add an instance from the project bar for an object type which has no other instances, it simply uses the defaults. This is all by design and working correctly.
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

Post » Fri Sep 26, 2014 7:32 pm

@Ashley Ok, that's fine but I wonder how anybody is meant to know that they 'should' do it that way? I mean the shared terminology is confusing when they are both called clone but they do different things. It maybe better to call the one in the project browser something else like 'duplicate' in my opinion. I raised this in the general forum before posting here to make sure it was issue and it seems that it wasn't just me wondering why properties weren't being copied.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542


Return to Closed bugs

Who is online

Users browsing this forum: zenox98 and 4 guests