Topic: Problem with unique iDs

Hello.

I have a problem with duplicating move files. In the old version I could easily duplicate moves files and then edit them. This is no longer so easy because the duplicated move has the same ID. This means, among other things, that the animation from the original file is always played, even in the duplicated and changed move file.

The only way to work with this that I've found so far is to open the move file in a script editor and manually change the ID of the duplicate itself.

Is there an easy fix?

thanks

2 (edited by shubi 2024-05-09 02:55:52)

Re: Problem with unique iDs

I found a "dirty" quick fix:

Simply comment out the "Disabled Group" in MoveEditorWindow.cs and change the iD manually after duplicating the move-file:

//EditorGUI.BeginDisabledGroup(true);
moveInfo.id = EditorGUILayout.TextField("Id:", moveInfo.id);
//EditorGUI.EndDisabledGroup();

However, I'm not sure if this will cause any other problems. Are the IDs registered somewhere?

Re: Problem with unique iDs

Hmm, the id is used in a bunch of areas in the code.
I don't fully understand how the id's work either.
Probably just best to keep an eye out in your project if anything strange happens as a result of this change.

Share

Thumbs up +1 Thumbs down

Re: Problem with unique iDs

The ids are used to link the animations from moves to the animation controller (Mecanim Control) and the animation maps. Previously, UFE would load the animations based on the move file, often causing conflicts.
UFE 2.6 has an issue right now where duplicated moves (Ctrl+D) get their ids duplicated.
There is a fix coming to this in the next update (2.6.1), but if you don't want to wait you can get it now through repository access. Your solution should do the job for now though. The important thing is that the ids are unique.

Like UFE? Please rate and review us on the Asset Store!
Questions about the Forum? Check out our Karma FAQ.
Don't forget to check our discord channel.

Re: Problem with unique iDs

Just to be clear, duplicating a move and manually changing its ID will _not_ cause problems? I've been wanting to do this but have been worried that I'd end up breaking my game down the line.

Share

Thumbs up Thumbs down

6 (edited by shubi 2024-05-19 11:59:34)

Re: Problem with unique iDs

I've been doing it this way for the last few days and simply changed the IDs. So far I haven't had any problems. However, I cannot guarantee this. If it's not urgent, it's better to wait for the update wink

Of course, you have to make sure that the IDs are unique, because they are the new identifiers for the moves and must not be assigned twice.
In addition, the first thing you should do immediately after duplicating is change the ID and then adjust the rest of the settings.

shubi's Website

Share

Thumbs up +1 Thumbs down

7 (edited by benmade1 2024-05-27 12:49:48)

Re: Problem with unique iDs

You can create a button to do this rather than doing it manually in the OnGUI() function. It looks a bit ugly but find this section of the function

EditorGUI.BeginDisabledGroup(true);
moveInfo.id = EditorGUILayout.TextField("Id:", moveInfo.id);
EditorGUI.EndDisabledGroup();

And then add this line afterwards

if (StyledButton("Change ID")) moveInfo.id = Guid.NewGuid().ToString();

Share

Thumbs up +1 Thumbs down