Jump to content
lgrant

Compile errors with Unity Pro 2017.2.1f1

Recommended Posts

Greetings,

I just purchased DTU...I was really impressed with the Draconus Icon Manager.

I am having trouble with DTU. (BTW, the support and "More Info" links in the Asset Store, as well as the support link in the ReadMe file, go to a dead link: http://forum.draconus.com/viewforum.php?f=22)

Bringing DTU into a fresh project, Unity asks if it can change the scripts because the API has changed. The only changes it makes are to lines 542 and 544 in TextureUtils.cs, and lines 662 and 664 in EditorTextureUtils.cs, where it changes "UnityEditor.TextureImporterType.Advanced" to "UnityEditor.TextureImporterType.Default".

I get the following errors and warnings:

Script 'Tilemap' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.


Some scripts have compilation errors which may prevent obsolete API usages to get updated. Obsolete API updating will continue automatically after these errors get fixed.

Assets/DTU/Script/TextureUtils.cs(568,12): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/TextureUtils.cs(570,9): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/TextureUtils.cs(688,24): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/TextureUtils.cs(690,24): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/TextureUtils.cs(2234,22): warning CS0219: The variable `flip' is assigned but its value is never used

Assets/DTU/Examples/Editor/DTUPyxelEditToUnity2D.cs(307,34): error CS0619: `UnityEditor.AnimationUtility.SetAnimationType(UnityEngine.AnimationClip, UnityEditor.ModelImporterAnimationType)' is obsolete: `SetAnimationType is no longer supported'

Assets/DTU/Script/Editor/EditorTextureUtils.cs(31,101): warning CS0618: `UnityEditor.TextureImporterFormat.AutomaticTruecolor' is obsolete: `Use textureCompression property instead'

Assets/DTU/Script/Editor/EditorTextureUtils.cs(31,143): warning CS0618: `UnityEditor.TextureImporterFormat.Automatic16bit' is obsolete: `Use textureCompression property instead'

Assets/DTU/Script/Editor/EditorTextureUtils.cs(89,16): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'

Assets/DTU/Script/Editor/EditorTextureUtils.cs(92,12): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'

Assets/DTU/Script/Editor/EditorTextureUtils.cs(118,16): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(118,68): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(119,16): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(119,68): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(120,16): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'

Assets/DTU/Script/Editor/EditorTextureUtils.cs(120,55): warning CS0618: `UnityEditor.TextureImporterFormat.AutomaticTruecolor' is obsolete: `Use textureCompression property instead'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(158,74): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(160,35): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(162,16): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(199,60): warning CS0618: `UnityEditor.TextureImporterFormat.AutomaticTruecolor' is obsolete: `Use textureCompression property instead'

Assets/DTU/Script/Editor/EditorTextureUtils.cs(202,38): warning CS0618: `UnityEditor.TextureImporterFormat.AutomaticTruecolor' is obsolete: `Use textureCompression property instead'

Assets/DTU/Script/Editor/EditorTextureUtils.cs(387,74): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(389,35): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'


Assets/DTU/Script/Editor/EditorTextureUtils.cs(391,16): warning CS0618: `UnityEditor.TextureImporter.textureFormat' is obsolete: `textureFormat is no longer accessible at the TextureImporter level. For old 'simple' formats use the textureCompression property for the equivalent automatic choice (Uncompressed for TrueColor, Compressed and HQCommpressed for 16 bits). For platform specific formats use the [[PlatformTextureSettings]] API. Using this setter will setup various parameters to match the new automatic system as well as possible. Getter will return the last value set.'

Some scripts have compilation errors which may prevent obsolete API usages to get updated. Obsolete API updating will continue automatically after these errors get fixed.

 

Thanks for your help,

Lynn

Share this post


Link to post
Share on other sites

OK, I figured out the cause of the fatal error.

The error at line 307 of DTUPyxelEditToUnity2D.cs is in this chunk of code:

#if UNITY_5
                // do nothing, no need to set the animation type in Unity 5                
#else
                AnimationUtility.SetAnimationType(def.animationClip, ModelImporterAnimationType.Generic);
#endif

The problem is that Unity is very literal about its #defines. I am not running Unity 5, I am running unity 2017.2, so instead of defining the UNITY_5 variable, Unity defines UNITY_2017 and UNITY_2017_2 variables.

Perhaps it would be better to change the #if to check if UNITY_4 was defined, and put the SetAnimationType call in the if, rather than the else.

Lynn

 

 

Share this post


Link to post
Share on other sites

Thanks for purchasing DIM and DTU!

While we do support both of the assets, they're not currently in active development and these things tend to happen when Unity goes and wrecks havoc in their API. I will check it out soon, and submit fixed version. Your suggestion seems like a good fix.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×