Unity 5 Support?
- OrenMunkyFun
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
9 years 9 months ago - 9 years 9 months ago #514
by OrenMunkyFun
Unity 5 Support? was created by OrenMunkyFun
Does the i2 Localization plugin work in Unity5?
We were about to buy it, but the asset store showed a popup saying that it might not work in Unity5.
We were about to buy it, but the asset store showed a popup saying that it might not work in Unity5.
Attachment ScreenShot2015-02-27at4.48.30PM.png not found
Attachments:
Last edit: 9 years 9 months ago by OrenMunkyFun.
Please Log in or Create an account to join the conversation.
9 years 9 months ago #515
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Unity 5 Support?
Hi,
I just downloaded the package (2.4.2 f1) from the AssetStore and imported it into a clean project in Unity 5.0.0 f3.
It worked without having to upgrade scripts.
You may get a warning saying that some script defines were not set as the group 0 is not recognized. Even though you get that warning, the plugin works fine.
Nonetheless, to remove that warning, please modify the function EnablePlugins() in the
file I2\Localization\Scripts\Editor\UpgradeManager.cs line 25 so that it looks like:
That will remove the warning.
This change has been added to 2.4.3 f1 which I should release later today or tomorrow.
Thanks,
Frank
I just downloaded the package (2.4.2 f1) from the AssetStore and imported it into a clean project in Unity 5.0.0 f3.
It worked without having to upgrade scripts.
You may get a warning saying that some script defines were not set as the group 0 is not recognized. Even though you get that warning, the plugin works fine.
Nonetheless, to remove that warning, please modify the function EnablePlugins() in the
file I2\Localization\Scripts\Editor\UpgradeManager.cs line 25 so that it looks like:
public static void EnablePlugins()
{
foreach (BuildTargetGroup target in System.Enum.GetValues(typeof(BuildTargetGroup)))
if (target != BuildTargetGroup.Unknown) // add this line
{
EnablePlugins( target );
}
}
That will remove the warning.
This change has been added to 2.4.3 f1 which I should release later today or tomorrow.
Thanks,
Frank
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.
9 years 8 months ago #559
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Unity 5 Support?
Hey Guys,
There was a regression of this issue version 2.4.4 f1. It seems that this fix was accidentally deleted when merging the branches.
I just added the fix into 2.4.4 f2 and will release it asap.
In the mean time, if someone gets an error similar to:
That can be fixed by replacing the function EnablePlugins in UpgradeManager.cs by this one:
Thanks,
Frank
There was a regression of this issue version 2.4.4 f1. It seems that this fix was accidentally deleted when merging the branches.
I just added the fix into 2.4.4 f2 and will release it asap.
In the mean time, if someone gets an error similar to:
PlayerSettings Validation: Requested build target group (0) doesn't exist; #define symbols for scripting won't be added.
UnityEditor.PlayerSettings:SetScriptingDefineSymbolsForGroup(BuildTargetGroup, String)
I2.Loc.UpgradeManager:EnablePlugins(BuildTargetGroup) (at Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs:96)
I2.Loc.UpgradeManager:EnablePlugins(Boolean) (at Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs:70)
I2.Loc.UpgradeManager:CheckPlugins(Boolean) (at Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs:20)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
That can be fixed by replacing the function EnablePlugins in UpgradeManager.cs by this one:
public static void EnablePlugins( bool bForce = false )
{
if (!bForce)
{
bool AutoEnablePlugins = EditorPrefs.GetBool(EditorPrefs_AutoEnablePlugins, true);
if (!AutoEnablePlugins)
return;
}
foreach (BuildTargetGroup target in System.Enum.GetValues(typeof(BuildTargetGroup)))
if (target!=BuildTargetGroup.Unknown)
{
EnablePlugins( target );
}
}
Thanks,
Frank
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.
9 years 8 months ago - 9 years 8 months ago #561
by cporter
Replied by cporter on topic Unity 5 Support?
This fix did not work me me.
In Visual Studiowith ReSharper, I received the following message when hovering over target in the line "EnablePlugins(target);"
"Argument type 'UnityEditor.BuildTargetGroup' is not assignable to parameter type 'bool'"
The Unity Console presented the following messages.
Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs(94,21): error CS1502: The best overloaded method match for `I2.Loc.UpgradeManager.EnablePlugins(bool)' has some invalid arguments
Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs(94,21): error CS1503: Argument `#1' cannot convert `UnityEditor.BuildTargetGroup' expression to type `bool'
In Visual Studiowith ReSharper, I received the following message when hovering over target in the line "EnablePlugins(target);"
"Argument type 'UnityEditor.BuildTargetGroup' is not assignable to parameter type 'bool'"
The Unity Console presented the following messages.
Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs(94,21): error CS1502: The best overloaded method match for `I2.Loc.UpgradeManager.EnablePlugins(bool)' has some invalid arguments
Assets/I2/Localization/Scripts/Editor/UpgradeManager.cs(94,21): error CS1503: Argument `#1' cannot convert `UnityEditor.BuildTargetGroup' expression to type `bool'
Last edit: 9 years 8 months ago by cporter.
Please Log in or Create an account to join the conversation.
9 years 8 months ago - 9 years 8 months ago #562
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Unity 5 Support?
Hi,
I just checked and there are two functions named EnablePlugins. One of them uses an optional bool and the other one uses a BuildTargetGroup. Did you accidentally deleted the second one? Sorry for not been more specific that only the first function has to be overriden.
That may explain why reshaper and unity doesn't detect a version that accepts a BuildTargetGroup as a parameter.
Attached you can find the UpgradeManager.cs file with the changes already set. Replace your version with this one and it will work.
Just to be sure, I also renamed the second function into EnablePluginsOnPlatform( BuildTargetGroup ).
Thanks,
Frank
I just checked and there are two functions named EnablePlugins. One of them uses an optional bool and the other one uses a BuildTargetGroup. Did you accidentally deleted the second one? Sorry for not been more specific that only the first function has to be overriden.
public static void EnablePlugins( bool bForce = false )
static void EnablePlugins( BuildTargetGroup Platform )
That may explain why reshaper and unity doesn't detect a version that accepts a BuildTargetGroup as a parameter.
Attached you can find the UpgradeManager.cs file with the changes already set. Replace your version with this one and it will work.
Just to be sure, I also renamed the second function into EnablePluginsOnPlatform( BuildTargetGroup ).
Thanks,
Frank
Attachment UpgradeManager.zip not found
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
Last edit: 9 years 8 months ago by Frank.
Please Log in or Create an account to join the conversation.
9 years 8 months ago #570
by cporter
Replied by cporter on topic Unity 5 Support?
Hello Frank,
You are correct, I replaced the wrong function. Thank you so much for posting the zip file; it fixed the issues I was having.
Best,
-Chris
You are correct, I replaced the wrong function. Thank you so much for posting the zip file; it fixed the issues I was having.
Best,
-Chris
Please Log in or Create an account to join the conversation.
Time to create page: 0.144 seconds