Forum rules - please read before posting.

ITranslatable - No gathering from prefabs, also from some ActionList Assets.

AC 1.65.0 - Unity 2018.3.13f1

I'm using the ITranslatable interface for the translation of custom scripts string properties that are attached to prefabs.
It's mostly either a component that extends an object that is instantiated in the scene with additional informations for the player. Or a manager. Since the great amount of information present this was to avoid clutter in the Variables manager.
So the ITranslate was used and it was great how easy it was to implement.

But we soon discovered that those strings in those prefabs weren't gathered, unless they are present in a scene. But the LineIDs need to be present in the prefabs themselves. So if those prefabs were instantiated in another scene, no translated string or correct one is returned since the LineID is still at its default value.

Also it was also discovered some ActionList Assets (containing ActionSpeech and such) that are called through script events instead of another Action List aren't gathered either.

I didn't find any information (or maybe missed it) in the manual on this matter if there is something that needs to be done for it to work.
Or if something wasn't done correctly.

Thank you!

Comments

  • edited May 2019

    If a prefab isn't present in a scene, or isn't referenced by an AC entity (e.g. a Menu, or an Inventory item), then the Speech Manager won't be aware that such a prefab is used by your game.

    Placing an instance of your prefab in your scene is necessary for it to be gathered. However, the ability to define Variables on components, separated from the Variables Manager, will be introduced in v1.68. If I understand you correctly, this should do away with your need for the above. Please PM me if you would like to be involved in beta testing.

  • Thanks,
    The solution I'll go for then is to create a special scene, set it in the Build Settings and put in it all the prefabs that are non-scene specific, also including all the ActionList Assets that aren't reference in any in-scene ActionLists. Do the gather text, then do an apply to save the line IDs.
    This requires to be really rigorous not to forget to do that last step when doing a Gather Text.

    The Variable on components sound great and would have helped on that need from what I understand.
    We are way to deep in development to apply it, though. So that would be for a next project.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.