Feature Request: Parse & Replace in Prefab

4 years 1 month ago #592 by JAC
For our game, most of our stuff is in prefabs, especially the UI that that's most important to our localization.

I2 Localization only appears to support parsing for references and replacing in scenes, but not prefabs (so far as I can tell). It'd be wonderful if it could support parsing prefab references and replacing references in those too.

I'm not sure, but I wonder if you could get part of the way there with AssetDatabase.LoadMainAssetAtPath and PrefabUtility.GetPrefabParent . Not sure entirely, but might be able to get, crawl through and edit the prefabs through that. I'm doing something similar in part of my editor code.

Many Thanks,

Please Log in or Create an account to join the conversation.

4 years 1 month ago #595 by Frank
Parsing all prefabs could be very slow. Normally when you access a prefab unity only loads the first couple levels of the hierarchy. In order for the plugin to search all prefabs in the project and replace the terms in the deep gameobjects, it will have to instantiate the prefab, modify it, save it again. As I don't have a way to know which prefabs contain localize components, then the plugin will have to instantiate ALL prefabs in the project. Which is slow to say the least :-(

I have been evaluating adding a text field to allow the user define some folders inside the project. And when scenes are parsed, then the prefabs inside those folders get instantiated and parsed as well. However, I haven't had much time to implement this as it seems that always there is some other feature/fix taking priority!

However, if what you are referring is to not parse the prefabs in the project, but to detect when a modification is done to a prefab that is already instantiated in the scene. And save that prefab so those changes spread to the other scenes where its instantiated. Then yes, that looks like a great suggestion!!!
I will add a checkbox into the Parse tool to force saving the modified prefabs!

Hope that helps,

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.122 seconds
Template by JoomlaShine