Localization definement not working properly

Hi, so lately I’ve been trying to define Unity Localization usage, but #if ENABLE_LOCALIZATION always returns true, even if the package is not imported in the project. I’ve tried all LTS releases (2019.4, 2020.3 and 2021.3) but the issue persists. Am I doing something wrong or is this a bug?

We don’t have any defines like that. Are you using version defines against the localization asmdef?

Oh shoot, thought it was related to Unity Localization (similar to Input System). Thanks a lot for your answer, I’ll find another workaround!

1 Like

I have the same issue, it would make things simple if this define was working, it is visible in both Assembly-CSharp.csproj and Assembly-CSharp-editor.csproj:

So, I created an asmdef in my package script folder, and after some trial and errors I did this:

And it seems to work. The version defines trick is explained here .

1 Like

That define has nothing to do with the localization package, it’s for editor localization. Localizing the editor into different languages etc.