Fix: Compile Error When Debugging Unity With VS

More
8 years 11 months ago #607 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:
EditorApplication.update += CheckPlugins;
because the type signature on:
public static void CheckPlugins( bool bForce = false )
does not exactly match the type signature of the editor update callback:
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.

More
8 years 11 months ago #608 by Frank
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

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.

More
8 years 11 months ago #611 by Frank

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.

More
8 years 11 months ago - 8 years 11 months ago #612 by JAC
Looks like it's up now. Just downloaded the update. Thanks/Sorry Frank! My bad for not seeing the other post.
Last edit: 8 years 11 months ago by JAC.

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

Time to create page: 0.513 seconds
Template by JoomlaShine