Fix: Compile Error When Debugging Unity With VS
9 years 8 months ago #607
by JAC
Fix: Compile Error When Debugging Unity With VS was created by JAC
When trying to
debug the Unity project with Visual Studio
(we're using 2015 CTP) there's a compile error in UpgradeManager.cs
It fails on line 13 on:
because the type signature on:does not exactly match the type signature of the editor update callback:
This compiles fine in Unity because the mono compiler in Unity will happily use the compatible signature, but not VS.
For me I fixed by replacing with:
So that the editor callback uses the exactly matching signature. It compiles and will debug in VS fine then.
Submitting in case you may want to push a similar change.
It fails on line 13 on:
EditorApplication.update += CheckPlugins;
public static void CheckPlugins( bool bForce = false )
public delegate void CallbackFunction();
This compiles fine in Unity because the mono compiler in Unity will happily use the compatible signature, but not VS.
For me I fixed by replacing with:
...
EditorApplication.update += OnEditorUpdate;
...
public static void OnEditorUpdate()
{
EditorApplication.update -= OnEditorUpdate;
CheckPlugins(false);
}
public static void CheckPlugins(bool bForce)
{
EnablePlugins(bForce);
CreateLanguageSources();
CreateScriptLocalization();
}
So that the editor callback uses the exactly matching signature. It compiles and will debug in VS fine then.
Submitting in case you may want to push a similar change.
Please Log in or Create an account to join the conversation.
9 years 8 months ago #608
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Fix: Compile Error When Debugging Unity With VS
Hi,
A similar fix for this issue is found here:
inter-illusion.com/forum/i2-localization...rror-in-2-4-4-f1#554
Also, this fix is included in version 2.4.5 which is now available for download in the AssetStore.
Thanks,
Frank
A similar fix for this issue is found here:
inter-illusion.com/forum/i2-localization...rror-in-2-4-4-f1#554
Also, this fix is included in version 2.4.5 which is now available for download in the AssetStore.
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 #611
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Fix: Compile Error When Debugging Unity With VS
Ahrrgggg, I double checked the assetstore and is still showing version 2.4.4 f1.
I already received an email from unity that 2.4.5 was approved, but I guess it still hasn't refreshed the store.
So I guess we will have to wait a couple hours for the new version should be available for download.
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 #612
by JAC
Replied by JAC on topic Fix: Compile Error When Debugging Unity With VS
Looks like it's up now. Just downloaded the update. Thanks/Sorry Frank! My bad for not seeing the other post.
Last edit: 9 years 8 months ago by JAC.
Please Log in or Create an account to join the conversation.
Time to create page: 0.203 seconds