Author Topic: Unity 2017 Beta  (Read 2407 times)

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5687
Unity 2017 Beta
« on: April 17, 2017, 05:02:19 PM »
Unity 2017 Beta 1 contains a new API change which affects the TMP Material Inspectors and as such will require the following changes.


Code: C#
  1. // TMP_BaseShaderGUI.cs -- Insert the #if block in the BeginProperty function at line 225.
  2.  
  3. MaterialProperty BeginProperty(string name)
  4. {
  5.     MaterialProperty property = FindProperty(name, properties);
  6.     EditorGUI.BeginChangeCheck();
  7.     EditorGUI.showMixedValue = property.hasMixedValue;
  8.     #if UNITY_2017_1_OR_NEWER
  9.          editor.BeginAnimatedCheck(Rect.zero, property);
  10.     #else
  11.          editor.BeginAnimatedCheck(property);
  12.     #endif
  13.     return property;
  14. }
  15.  

thalejandro

  • Newbie
  • *
  • Posts: 10
Re: Unity 2017 Beta
« Reply #1 on: May 15, 2017, 10:19:53 PM »
I just upgrade to 2017.1.0b5 and I'm getting an error at TMPro_FontAssetCreatorWindow#141 about TMPro_EditorUtility not existing. I'm guessing it has something to do with the directive above that for `#if !UNITY_5`. I got it to compile by switching to `#if !UNITY_5_3_OR_NEWER`. Wont work for version older than that but works fine for my case.

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5687
Re: Unity 2017 Beta
« Reply #2 on: May 15, 2017, 11:11:28 PM »
I just upgrade to 2017.1.0b5 and I'm getting an error at TMPro_FontAssetCreatorWindow#141 about TMPro_EditorUtility not existing. I'm guessing it has something to do with the directive above that for `#if !UNITY_5`. I got it to compile by switching to `#if !UNITY_5_3_OR_NEWER`. Wont work for version older than that but works fine for my case.

That block of code which was designed to handle loading of DLL in Unity 4.x releases can actually be removed completely.