How do I Copy a layout but have new UIDs per object?

Get help using Construct 2

Post » Tue Jan 03, 2017 8:22 am

Hi

I have read this thread : easiest-way-to-make-multiple-levels_t63384?start=10 and searched avidly on this forum for an answer but I have struggled to find what I am after.

Basically I need to copy/clone the structure of a layout from one scene to another but when I do this with duplicate or copy and paste, the UIDs of the original objects remain the same for the newly copied objects which means that when I change the object name on the newly copied version, it renames the object name on the existing version.

Is there an easy way of doing this or would I have to keep adding and layouting the same structure on the new layout ?
Last edited by timcs on Tue Jan 03, 2017 8:14 pm, edited 2 times in total.
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Tue Jan 03, 2017 10:32 am

Right click the layout in the project three, choose duplicate.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Jan 03, 2017 10:59 am

UIDs should not be duplicated - they should be unique per instance within the same project. You should probably file a bug if you're seeing one project with the same UID used twice.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Tue Jan 03, 2017 1:25 pm

@99Instances2Go that is what I have tried and the UIDs remain the same on both layouts

@Ashley Ok thanks for this
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Tue Jan 03, 2017 1:31 pm

Just tested this on r241 and UIDs are definitely unique and not duplicated on new Layout.

Would it be possible to show us an example .capx where this is happening?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,415
Reputation: 59,516

Post » Tue Jan 03, 2017 6:23 pm

@zenox98 I will upload a capx file for this, however the release you have is this just a testing release and not a public release ?

** EDIT **

Now I feel embrassed as I have tried to re-create this on this release and cannot :oops: I know it was definatley happening because everytime I change the object name on the new layout, it kept changing it on the original and the UIDs were the same aarrrrrrghhhh.

Sorry to waste everyones time :(
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Tue Jan 03, 2017 8:15 pm

I think I have found the issue, it is when you rename the object on the new layout after it has been copied. I am going to test this on a new project to see if it happens then. It appears fine when the layout has been copied but as soon as I renamed the new object to something else it seems to change the same object on the original layout as well and then they both have the same UID
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Tue Jan 03, 2017 8:28 pm

Yep created a new project copied the layout 1 to layout 2 and the objects are not newly created for layout 2 so when I then rename the e.g. "text" object on the new layout (layout 2) it renames the object on the original layout as well.
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Post » Tue Jan 03, 2017 8:38 pm

It takes a few seconds for 'it' to update the property text for UID. Why, i dont know. Give it a few seconds, and you will see that they have definitely different UID's.

The name changing in both layouts is normal eh. Confusing remark.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Jan 03, 2017 9:16 pm

@99Instances2Go My problem here is that I need the objects to be separate as if I refer to the object by its name would this not conflict ? The idea being is to make a complete clone of the original layout and have it clone all of its objects as well .

Does this mean I would have to re-create the second layout manually ?
Regards

TimCS
B
23
S
8
Posts: 132
Reputation: 1,921

Next

Return to How do I....?

Who is online

Users browsing this forum: Anna Nehves Br, divsyntax, lennin83, oosyrag, volumetv and 16 guests