playMaker

Author Topic: playmaker error[SOLVED]  (Read 2280 times)

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
playmaker error[SOLVED]
« on: February 17, 2015, 01:24:13 PM »
I get the following error:
Assets/PlayMaker/Editor/PlayMakerGUIInspector.cs(26,26): warning CS0618: `UnityEditor.EditorGUIUtility.LookLikeInspector()' is obsolete: `LookLikeControls and LookLikeInspector modes are deprecated.'

The line in the playmaker script is:
EditorGUIUtility.LookLikeInspector();

It comes from this:
#if UNITY_4_3 || UNITY_4_5
       EditorGUIUtility.labelWidth = 210;
#else
        EditorGUIUtility.LookLikeInspector();
#endif


It it safe to comment it out or something?  I am using unity 4.6.2 and will never use a older version.
« Last Edit: February 18, 2015, 01:11:02 AM by jeanfabre »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: playmaker error
« Reply #1 on: February 17, 2015, 01:32:47 PM »
The warning is harmless and is fixed in the next update.

If you want to fix it now replace those lines with these:

Code: [Select]
#if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_2
        EditorGUIUtility.LookLikeInspector();
#else
        EditorGUIUtility.labelWidth = 210;
#endif

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: playmaker error
« Reply #2 on: February 17, 2015, 01:43:25 PM »
Is this it?
Replace your usage of EditorGUIUtility.LookLikeInspector with:
 // Instead of:
 EditorGUIUtility.LookLikeInspector();
 
 // Use:
EditorGUIUtility.labelWidth = 0;
 EditorGUIUtility.fieldWidth = 0;

http://answers.unity3d.com/questions/575939/now-that-looklikeinspector-is-obsolete-what-do-i-u.html

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: playmaker error
« Reply #3 on: February 17, 2015, 01:50:56 PM »
Replace the lines you copied in the first post:
Code: [Select]
#if UNITY_4_3 || UNITY_4_5
       EditorGUIUtility.labelWidth = 210;
#else
        EditorGUIUtility.LookLikeInspector();
#endif

With the code I posted:
Code: [Select]
#if UNITY_3_5 || UNITY_4_0 || UNITY_4_0_1 || UNITY_4_2
        EditorGUIUtility.LookLikeInspector();
#else
        EditorGUIUtility.labelWidth = 210;
#endif


wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: playmaker error
« Reply #4 on: February 17, 2015, 02:02:47 PM »
Thanks.